Difference between revisions of "Shells backup"
imported>Wikiadmin |
imported>Wikiadmin (Rewrite backups page to be inline with current policies) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
=== File backups === | === File backups === | ||
− | + | A nightly copy of the main storage (SSD array) is made every day at 10pm local time. For the coldstorage drive there is a weekly backup made every Sunday. These copies are mainly meant to have a restore point in case some form of catastrophic failure should occur, however if you need files from the backup you can contact a member of our staff to help restore it for you. (In the future we will be adding an automated system for this, but for now contacting staff is the only way.) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== MySQL database backups === | === MySQL database backups === | ||
− | + | We do include a backup of the full MySQL server in our backups, but it is usually not practical to try and restore a single database from the master backup. Therefore if you require backups of your MySQL database(s) we recommend you create a cronjob to dump your database on a regular basis. | |
− | |||
user@Lydia:~$ crontab -e | user@Lydia:~$ crontab -e | ||
Line 30: | Line 12: | ||
This will open up your crontab for editing. Add the following command to make a daily backup of your database. | This will open up your crontab for editing. Add the following command to make a daily backup of your database. | ||
− | @daily mysqldump -u | + | @daily mysqldump -u databse_username -pdatabase_password database_name > $HOME/mysql_backups/my_database.sql |
Obviously you need to replace the username, password, database and backupfile.sql with the ones you use. | Obviously you need to replace the username, password, database and backupfile.sql with the ones you use. | ||
Make sure to include the full path in the backup file name. (/home/username/mybackup/database.sql). | Make sure to include the full path in the backup file name. (/home/username/mybackup/database.sql). | ||
:There is '''no space''' between -p and your password! | :There is '''no space''' between -p and your password! | ||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 10:59, 25 February 2019
File backups
A nightly copy of the main storage (SSD array) is made every day at 10pm local time. For the coldstorage drive there is a weekly backup made every Sunday. These copies are mainly meant to have a restore point in case some form of catastrophic failure should occur, however if you need files from the backup you can contact a member of our staff to help restore it for you. (In the future we will be adding an automated system for this, but for now contacting staff is the only way.)
MySQL database backups
We do include a backup of the full MySQL server in our backups, but it is usually not practical to try and restore a single database from the master backup. Therefore if you require backups of your MySQL database(s) we recommend you create a cronjob to dump your database on a regular basis.
user@Lydia:~$ crontab -e
This will open up your crontab for editing. Add the following command to make a daily backup of your database.
@daily mysqldump -u databse_username -pdatabase_password database_name > $HOME/mysql_backups/my_database.sql
Obviously you need to replace the username, password, database and backupfile.sql with the ones you use. Make sure to include the full path in the backup file name. (/home/username/mybackup/database.sql).
- There is no space between -p and your password!