(You must already be logged in to Gitlab or you’ll hit a 404)
This is part of the Symbiosis migration guide. Read that first if you haven’t already!
This is the process of transferring your databases, sites and mailboxes from an old Symbiosis server to a new Symbiosis server. It’s essentially synchronizing your two servers so that they have the same data.
adminuser using an SSH-client (eg, PuTTY). If using PuTTY, enter the Host Name (eg,
old.vm.bytemark.co.uk) and connect. When it prompts you for a user, type
Enter, and type your password.
Paste this command into your SSH-client and enter your
again. This may cause a little bit of downtime, but probably not more than a
few seconds (unless you’ve got a very large, complex database).
sudo mysqldump --defaults-file=/etc/mysql/debian.cnf --all-databases --add-drop-database --opt | gzip -9 > /srv/everything.sql.gz
You now have an export of your databases (including database users) at
/srv/everything.sql.gz. We’ll import this into the new server later.
We need to copy an important maintenance file. Run these two commands so that in the next section it will get transferred across to your new server:
sudo cp /etc/mysql/debian.cnf /srv/ sudo chown admin:admin /srv/debian.cnf
Now you can logout of your old server.
On Symbiosis, all of your sites and mailboxes are stored inside the
directory. Let’s copy it all across. This will normally take a few minutes, but
could take up to an hour or more if you have many gigabytes of data.
adminuser using an SSH-client, similar to what you did above to login to your old server.
old.vm.bytemark.co.ukwith the name of your old server:
sudo rsync -av -e ssh email@example.com:/srv/ /srv/
You’ll be prompted for a few things:
[sudo] password for admin
adminpassword of your new server. You might not be asked for this.
Are you sure you want to continue connecting (yes/no)?
adminpassword of your old server.
While you’re still logged into your new server, paste this command into
your SSH-client and enter your
zcat /srv/everything.sql.gz | sudo mysql --defaults-file=/etc/mysql/debian.cnf
Now restart MySQL by running this command:
sudo service mysql restart
Run these two commands:
sudo cp /srv/debian.cnf /etc/mysql/debian.cnf rm /srv/debian.cnf
If you’ve made any other changes to your old server that are outside of the
/srv directory, you need to manually make those changes on your new
server too (assuming you want to keep those changes).
For example, if you’ve made changes to the Symbiosis firewall then you’ll probably want to make the same changes on your new server. And if you added any system cron jobs, don’t forget those!
The MySQL root password is usually important to have to hand. If you don’t know your MySQL root password, here’s how to reset it.
Follow these instructions to test your sites freely. Meanwhile, the rest of the internet still thinks your sites are hosted on your old server and service is unaffected.
Once you’re happy that your sites are working on your new server, make the switch to the new server!