Skip to content

Volume Backup

In addition to database backups, you may also need to back up persistent data stored in Docker volumes, such as uploaded files, configuration files, and logs.

Docker volumes are the mechanism for persistent container storage. Data in volumes is preserved when containers restart or are redeployed. Common volume data includes:

  • User-uploaded files (images, documents, etc.)
  • Application configuration files
  • Cache data
  • Log files
  • CMS media files (e.g., WordPress uploads directory)
  1. Go to the application settings page
  2. Click the “Volumes” tab
  3. Click “Backup” next to the volume you want to back up
  4. Select the backup destination (local or cloud)

You can set up automatic schedules for volume backups:

SettingDescription
ScheduleCron expression or preset frequency
RetentionNumber of recent backups to keep
StorageLocal or S3-compatible storage
CompressionWhether to compress (recommended)
Terminal window
# Schedule example: daily at 3:00 AM
0 3 * * *

Volume backups package all files in the volume into a compressed archive:

Terminal window
# Backup file format
volume-name_2024-01-15_030000.tar.gz

The backup process roughly follows:

  1. Pause writes (if consistency is needed)
  2. Package volume contents into a tar file
  3. Compress with gzip
  4. Upload to the specified storage location
  5. Clean up old backups according to retention policy
  1. Go to the backup list
  2. Select the backup version to restore
  3. Click “Restore”
  4. Confirm the operation

If you only need to restore specific files:

  1. Download the backup archive
  2. Extract locally
  3. Find the needed files
  4. Upload to the volume via the dashboard terminal
  1. Prioritize by importance — Not all volumes need backup. Cache data usually doesn’t, but user-uploaded files must be backed up.

  2. Use cloud storage — Store backups in S3 or similar services to ensure recovery even if the VPS fails entirely.

  3. Test restores regularly — Periodically restore from backups to a test environment to verify backups actually work.

  4. Monitor backup sizes — Volume backups can grow quickly over time. Watch storage costs accordingly.

  5. Set reasonable retention policies — Based on data importance and change frequency, configure appropriate backup retention counts.