Backup is a VERY important thing. I’m unfortunately not the best to remember it myself and it’s been costly.. But it is also very nice to dump all tables to a file and move it to another server and restore it with a simple command (after you have created the database of course).

To back up your database use the following command:

mysqldump -u [Username] -p[password] [databasename] > [backupfile.sql]

And to restore it again use this:

mysql -u [Username] -p[password] [databasename] < [backupfile.sql]

And then it’s done! Just remember to store your backups a safe place.