Although we provide 30-day automatic backups for our clients, we recommend supplementing these with your own backups. Maintaining multiple backup sources is a best practice to prevent catastrophic data loss. If suitable storage space is available, we also recommend maintaining a history longer than 30 days.
SSH is a reliable way to create backups of your site files and database.
ATTENTION: The creation of backups generates significant load and can degrade site performance, especially for large databases. Consider waiting until non-peak hours.
mysqldump --opt --skip-lock-tables --routines --max_allowed_packet=2G -u USERNAME -p DATABASE | gzip > database-backup-$(date +%F).sql.gz
To create a backup of your site files, change to the domain directory:
Then, create a backup of your domain’s html directory:
tar -czf html-backup-$(date +%F).tar.gz html
ATTENTION: Before restoring the database, we recommend creating a backup using the method provided above.
mysql -u USERNAME -pEnter your password when prompted, then issue:
drop database DATABASE; create database DATABASE; exit;
zcat database-backup-DATE.sql.gz | mysql -u USERNAME -p DATABASE
ATTENTION: Before restoring your files, we recommend creating a backup using the method provided above.
rm -r htmlIf you do not wish to delete the html directory, you may instead rename it to html.oldor another option:
mv html html.old
tar -xzf html-backup-DATE.tar.gz
This operation may take some time to complete; to prevent idle-timeout, tap the spacebar every 30 seconds.
You can retrieve the database, username, and password values for any domain by running the following SSH commands from the html directory of that domain: To do so, first, change to the html directory of that domain:
Then, issue one of the below commands:
grep -C2 username app/etc/local.xml
grep -C2 username app/etc/env.php
grep -C3 password wp-config.php
Our award-winning customer care team is here for you.Contact Support