This article covers three backup approaches for your Drupal site on HOSTDOG: automated daily backups provided by HOSTDOG (included on all plans), manual database backup using Drush or phpMyAdmin, and manual file backup. It also covers the full restore process for each method.
HOSTDOG automated daily backups
All HOSTDOG shared hosting plans include automated daily backups at no extra charge. These backups cover your entire hosting account — all files in public_html and all databases. Backups are stored offsite and retained according to your plan's backup policy.
To restore from an automated backup, open a support ticket from your client area and specify the file or database you need restored and the date. Our team will restore it promptly. See how HOSTDOG backups work for details on retention and what's included.
Manual backup: database
For on-demand backups before updates or migrations, use one of these methods to export your Drupal database.
Connect to your hosting via SSH and navigate to your Drupal root directory. Then run:
drush sql-dump --result-file=~/drupal-db-backup-$(date +%Y%m%d).sql
This exports the entire Drupal database to a timestamped .sql file in your home directory. To compress it:
drush sql-dump --gzip --result-file=~/drupal-db-backup-$(date +%Y%m%d).sql.gz
See how to use Drush on your HOSTDOG hosting for SSH connection details.
In your control panel, open phpMyAdmin. Select your Drupal database from the left sidebar, click the Export tab, leave the format as SQL, and click Go. Your browser will download the .sql file. See how to import/export a database via phpMyAdmin.
Manual backup: files
A database backup alone is not sufficient for a complete site restore. You also need a backup of your Drupal files — especially the sites/default/files/ directory which contains uploaded media, and your settings.php.
To archive your Drupal files via SSH:
# Archive entire public_html (full site backup)
tar -czf ~/drupal-files-backup-$(date +%Y%m%d).tar.gz ~/public_html/
# Archive only the files directory (uploads/media)
tar -czf ~/drupal-uploads-backup-$(date +%Y%m%d).tar.gz ~/public_html/sites/default/files/
Download the archive to your local machine using FTP, SFTP, or your control panel's File Manager.
public_html/web/ — since composer.json and composer.lock are essential for reproducible deploys.
Restore process
To restore your Drupal site from a manual backup, follow these steps. This assumes you are restoring to the same server (e.g., after a failed update). For restoring to a new server, see how to migrate your Drupal site to HOSTDOG.
Via Drush (fastest for large databases):
drush sql-cli < ~/drupal-db-backup-20260324.sql
Or via phpMyAdmin: open your Drupal database, click the Import tab, upload the .sql file, and click Go.
If you backed up the full site directory, extract the archive back to the correct location:
tar -xzf ~/drupal-files-backup-20260324.tar.gz -C ~/
If restoring only the files directory:
tar -xzf ~/drupal-uploads-backup-20260324.tar.gz -C ~/public_html/sites/default/
After restoring, clear Drupal's cache:
drush cr
Visit your site to confirm pages load correctly, user accounts are intact, and all content is present.