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.

Tip: Automated backups are a safety net — not a substitute for your own manual backups before major changes like Drupal core updates or site migrations.

Manual backup: database

For on-demand backups before updates or migrations, use one of these methods to export your Drupal database.

Option A:
Backup with Drush (recommended)

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.

Option B:
Backup via phpMyAdmin

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.

Note: For Drupal installations managed with Composer, back up the entire project directory — not just 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.

Step 1:
Restore the database

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.

Warning: Importing a database will overwrite all current data in that database. Ensure you are importing to the correct database and that you have a recent backup of the current state before proceeding.
Step 2:
Restore the files

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/
Step 3:
Clear the cache and verify

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.

Need Help? If you need to restore from an automated HOSTDOG backup or need assistance recovering your Drupal site, our team is here 24/7. Navigate to the HOSTDOG homepage and click the Log in button to open a support ticket and we'll assist you promptly.