How to migrate linux server droplet with data backup and software and database sql
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hello @dprai-com
We have a series of tutorials on How To Migrate to a New Linux Server
https://www.digitalocean.com/community/tutorial_series/how-to-migrate-to-a-new-linux-server
As for the database, you can migrate it over to your DigitalOcean droplet using the
mysqldump
command.To Export a database, open up a terminal, making sure that you are not logged into MySQL and type,
The database that you selected in the command will now be exported to your droplet.
To import a database, first, create a new blank database in the MySQL shell to serve as a destination for your data.
Then log out of the MySQL shell and type the following on the command line:
With that, your chosen database has been imported into your destination database in MySQL.
Additionally, if you’re interested in to DigitalOcean’s Managed Database you can use the online import tool to quickly migrate your database.
https://www.digitalocean.com/blog/migrate-your-database-to-digitalocean-managed-databases
Online migration allows you to transfer data from a database that’s either hosted on DigitalOcean (e.g. database running on a Droplet) or someplace else (e.g. an on-premises database or database in other cloud providers).
Regards
Hi @dprai-com,
When talking about migrations, before you start migrating your websites you’ll need to configure everything else.
We have a series of tutorials that cover the process of migrating from one Linux server to another which you can check here:
https://www.digitalocean.com/community/tutorial_series/how-to-migrate-to-a-new-linux-server
In general, depending on your site/application you will need to spin up a droplet that matches your current hosting provider environment or at least is suitable for your app/site needs (e.g running the same PHP version). Then you need to migrate your data (files, users, database and etc).
Additionally, if you are using WordPress as a CMS, you can use the WP All in One plugin or Duplicator to migrate all of your WordPress websites.
https://wordpress.org/plugins/all-in-one-wp-migration/
https://wordpress.org/plugins/duplicator/
If you have to move some of the data manually you can do that via ssh using scp or rsync. Another option is to use an FTP client like FileZilla
https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh
https://docs.digitalocean.com/products/droplets/how-to/transfer-files/