- 1 Overview
- 2 Automatic backups
- 3 Restoring your domain
- 4 Restoring your database
- 5 Using one-click backup
- 6 Manual backup techniques
- 7 WordPress backup
- 8 How to manually backup your Dedicated site files
The following details provide information for the various methods to backup your web files, databases, and emails for your DreamHost account.
Your DreamHost panel offers two types of backups for your domain:
- The domain restore option through the (Panel > ‘Domains’ > ‘Manage Domains’’) page.
- The “one-click” backup option through the (Panel > Billing & Account’ > ‘Backup Your Account’) page.
Both options are discussed in the following sections.
Restoring your domain
Your DreamHost panel offers a domain restore option to restore your domain. You can find that option on the (‘Panel’ > 'Domains' > ‘Manage Domains’) page for each domain listed:
- Click the Restore button in the far right.
- The Restore page appears:
- Choose from the following sections:
- Available Backup Dates: There are three time-frame options available for your domain’s backups:
- -1 hour to 1 day
- -1 day to 2 weeks
- -2 weeks or possibly more.
- Restore Options: The two options allow you to either restore the selected backups to your current live site or restore the selected backups as a separate folder.
Copy the backup files to /home/username/example.com_TIMESTAMP
- If the restore is set to restore to a different folder, that folder is then created and named as the directory name plus the date and time it's processed.
Make the backup copy live and backup all the current live files to: /home/username/example.com_TIMESTAMP
- The second option keeps the current site contents live. The old live directory name is then changed to that directory name plus the date and time it's processed.
- Click the blue Restore example.com now! button to complete this process. (Replace the domain name listed in the button with your own domain name being restored.)
Once you click the Restore button, you are redirected back to the ‘Manage Domains’ page where you see a green message at the top of the page stating that the restore is processing and will complete based on how large the backups are. You are notified via email once that completes.
|Note:||As stated on the restore page for your domain, DreamHost does not guarantee the backups for your domains. It is highly advised that you always keep local backups of your site contents just in case a DreamHost backup is not available.|
Restoring your database
Websites using software such as WordPress also have a database that's necessary to run the site. The instructions above explain how to restore only your web server files.
If you need to completely restore a site, both the website files and database should be restored. View the following link for instructions on how to restore the database:
Using one-click backup
The ‘one-click’ backup option through your panel can be found on the (‘Panel’ > ‘Billing & Account’ > ‘Backup Your Account’) page. This is a very simple way to backup your entire account, including all users, databases, and mailboxes.
When you open the ‘Backup Your Account’ page, you see the one-click option near the bottom of the page:
- Click the Back me up! button. The backup process begins and takes some time to complete based on how much content there is to backup. You are notified via email once this completes as shown in the image below:
- The notification email you receive links you back to the ‘Backup Your Account’ page where you see the details below:
- Under the ‘FileName’ column, you see everything that was backed up listed as individual links to download. The ‘Size’ column shows the size of each file. All of the backups are listed as a ‘.tar.gz’ file for you to download locally.
Manual backup techniques
There are also manual methods to backing up the contents for your account. Outlined below are the various backup options for the various services set up on your account:
Backing up via FTP
If your user has a large amount of content, you may want to back up that user manually. This is done via FTP, which you can read more about here:
Backing up your database
There are a few methods for backing up your databases. One way is done through the phpMyAdmin interface, which would be the simplest way to complete this process. The other options for backing up the MySQL database are outlined on the following article:
Backing up email
You can backup your email manually through an email client. This is done through a mail client configured to download the messages from DreamHost servers to your local computer. The messages are then backed up on the computer that downloaded them.
You can read more about this process in backing up emails here:
There are many popular plugins to use for backing up WordPress. You can store your backups on Amazon S3, DropBox, or even DreamObjects. Whenever possible, DreamHost recommends that you limit the number of backups to a reasonable amount, as infinite backups can cause performance issues on your site.
- DreamObjects backups plugin – Written specifically to work with DreamObjects!
For more information about the DreamObjects service, see the following category page:
How to manually backup your Dedicated site files
Dedicated servers do not have the option for customers to restore a website backup from the control panel. All restores need to be done using an admin user, using the below techniques.
The following commands require SSH access.
The backups for Dedicated servers are accessible from the /mnt/backup directory of the server.
root@ds123456:~# cd /mnt/backup/home/USERNAME
- To restore something from the most recent backup, rename the directory of the website you wish to restore. For example, if your site is example.com, rename it to example.com.old.
- Then create a new empty website folder. In this example it would be a blank folder named example.com.
- Next, run an rsync to copy the files to this new blank folder:
rsync -av /mnt/backup/home/USERNAME/example.com/ /home/USERNAME/example.com/
Restoring older backups
If you need older backups, the snapshots can be found in the .zfs and snapshot directory:
root@ds123456:/mnt/backup/.zfs/snapshot# ls zfs-auto-snap_daily-2016-03-11-16h18 zfs-auto-snap_daily-2016-03-15-16h18 zfs-auto-snap_daily-2016-03-18-16h18 zfs-auto-snap_daily-2016-03-12-16h19 zfs-auto-snap_daily-2016-03-16-16h18 zfs-auto-snap_weekly-2016-03-06-16h18 zfs-auto-snap_daily-2016-03-14-16h18 zfs-auto-snap_daily-2016-03-17-16h18 zfs-auto-snap_weekly-2016-03-13-16h18
To restore something from a snapshot, rename the directory of the website you wish to restore as mentioned above, create a new blank directory, then run rsync:
rsync -av /mnt/backup/.zfs/snapshot/SNAPSHOTDIR/home/USERNAME/example.com/ /home/USERNAME/example.com/