After replacing the hard drive in my laptop, I realized I forgot to make a backup of my databases. I still have the old drive available as external harddisk, but I can't boot into it.
The OS on both the old and new machine are Ubuntu 16.04, and the MariaDb version on both is 10.* The databases are all innodb.
I've tried pointing the datadir of my new installation to the old datadir, but that results in mysqld never starting.
I still have the complete disk, including the old mariadb binaries. Is there some way I can run those? I just need them for a few minutes to do a backup.
I have no idea if pointing to the old datadir works.
What I did and it worked fine for me in order to move data from an old server to a new one is: installed mysqld services on a new machine and before starting it, synced the data directory. After that starting the mysqld service on the new server I could find all databases completely intact.
Related
Testing on Virtualbox with laravel dusk and using as test database sqlite I get
unlink(/var/www/laravel/database/database.sqlite): Text file busy
after researches I understand this problem is mainly because of Virtualbox shared folder.
I was trying to call the sqlite file from /tmp folder but in this case I get
Database (/tmp/database.sqlite) does not exists
How would I manage this issue to have my tests running
First of all, you should manually create file:
touch /tmp/database.sqlite
It's true, that using Virtualbox or Docker there might be issues with file sharing. I had Text file busy error many times. Usually to solve this you need to restart your VM to get rid of this error.
I have installed openstack by installing devstack environment, where I am finding difficult to save the work after host reboot.However if I install openstack component wise, will it help me in any ways in saving my work after host reboot, and are there any extra benefits of installing openstack component wise
Installing Openstack component wise would certainly enhance your end to end understanding of how services interact with each other. Devstack is an all in one place sort of installation. For better understanding, I'd recommend to install each component manually following the Openstack documentation.
The cause why the vm data is lost after reboot is because you are launched the vm with the ephemeral disk, which will be gone after the vm reboot.
Try to create the instance with root disk, then you will have the permenant disk.
From my research I understand that VirtualBox synced folders have permissions set up during the mounting process. Later, I am unable to change it therefore permissions for the whole synced folder MUST be same for every single file/folder in the shared folder. When trying to change with or without superuser permissions, changes are reverted straight away.
How this can work with for example Symfony PHP framework where there are several different permissions for different files/folders? (i.e. app/console needs execute rights but I don't want to have 7XX everywhere).
I have found in different but similar question (Vagrant and symfony2) that I could set the permissions to 777 for everything in the Vagrantfile, however this is not desirable as I need to use GIT behind my source code which is than deployed to the live environment. Running everything under 777 in the production is, nicely put, not correct.
How do you people cope with this? What are yours permissions setups?
A possible solution could be using the rsync synced folder strategy, along with the vagrant rsync and vagrant rsync-auto commands.
In this way you'll lose bidirectional sync, but you can manage file permission and ownership.
I am in a similar situation. I started using Vagrant mount options, and found out that as I upgraded parts of my tech stack (Kernel, Virtualbox, Vagrant, Guest Additions) I started getting different behavior while trying to set permissions in synced folders.
At some point, I was perfectly fine updating a few of the permissions in my shell provisioner. At first, the changes were being reflected in the guest and the host. At another point in time, it was being done the way I expected, with the changes being reflected only in the guest and not the host file-system. After updating the kernel and VB on my host, I noticed that permission changes in the guest are being reflected on the host only.
I was trying to use DKMS to compile VBOX against an older version of my Kernel. No luck yet.
Now when I have little more experience, I can actually answer this question.
There are 3 solution to this problem:
Use Git in your host system because vagrant basic shared folders setup somehow forces 777 (at least on Windows hosts)
Use NFS shared folders option from the vagrant (not available on Windows out of the box)
Configure more complex rsync as mentioned in Emyl's answer (slower sync speeds).
I'm using CentOS 6.5 where I successfully install Oracle XE. I want to change my Initial Hostname 'NAFD.WS' to something else. Will this affect Oracle Xe installation? If yes, what's the work around aside from reinstalling the Oracle Xe.
Thanks for your time dear SO.
Looks like your question is addressed here: http://minhtech.com/oracle/oracle-11g-xe-hostname-change/
Basically:
Edit both the listener.ora and tnsnames.ora files at $ORACLE_HOME/network/admin/listener.ora and $ORACLE_HOME/network/admin/tnsnames.ora. In the files, replace instances of the old hostname with the new hostname. Finally, log into root and force a reload:
$ su -
$ /etc/init.d/oracle-xe force-reload
In terms of database functionality, it shouldn't matter. I haven't installed XE in a long time, so, I'm not sure if there's an Oracle inventory, like there is w/ SE and EE. If so, that would be broken, as the hostname is written into the inventory, and there's no supported way to update that. That would imply you can't apply any patches, but, with XE, there aren't any made available anyhow.
If you were running RAC, you'd need to wipe and re-configure CRS, update local and remote listener configs, etc.
But, for XE, I think you'll be fine.
As always, if you care about the data in the database, be sure to take a backup before you proceed.
-Mark
Can you throw some points on how it is a best way, best practice
to install web application on Unixes?
Like:
where to place app and its bases and so for,
how to configure to be secure and easy to backup,
etc
For example I know such suggestion -- to set uniq user for each app.
App in question is Jira on FreeBSD, but more general suggestions are also welcomed.
Here's what I did for my JIRA install on Fedora Linux:
Create a separate user to run JIRA
Install JIRA under the JIRA user's home directory
Made a soft link "/home/jira/jira" pointing to the JIRA installation directory (the directory as installed contains the version number, something like /home/jira/atlassian-jira-enterprise-4.0-standalone)
Created an /etc/init.d script to run JIRA as a service, and added it to chkconfig so that it runs at system startup - see these instructions
Created a MySQL database for JIRA on a separate data volume
Set up scheduled XML backups via the JIRA admin interface
Set up a remote backup script to dump the MySQL database and copy the DB dump and XML backups to a separate backup server
In order to avoid having to open extra firewall ports, set up an Apache virtual host "jira.myhost.com" and used mod_proxy to forward requests to the JIRA URL.
I set everything up on a virtual machine (an Amazon EC2 instance in my case) and cloned the machine image so that I can easily restart a new instance if the current one goes down.