Skip to content

Database Backup

Piora uses each database’s native backup tools to ensure backup integrity and compatibility.

DatabaseBackup ToolBackup Format
PostgreSQLpg_dump.sql / .dump
MySQL / MariaDBmysqldump.sql
MongoDBmongodumpBSON binary
  1. Go to your PostgreSQL database settings page
  2. Click the “Backup” tab
  3. Configure the backup schedule and storage location
  4. Click “Enable”
ParameterDescriptionRecommended
Backup formatPlain SQL or custom formatCustom format (supports parallel restore)
CompressionWhether to compress backup filesEnabled
ScheduleBackup frequencyDaily
RetentionNumber of backups to keep7
Terminal window
# Manually trigger a backup (via dashboard terminal)
pg_dump -U piora_admin -Fc myapp > /backup/myapp_$(date +%Y%m%d).dump
# Restore from backup
pg_restore -U piora_admin -d myapp /backup/myapp_20240115.dump
  1. Go to your MySQL database settings page
  2. Click the “Backup” tab
  3. Configure parameters and schedule
  4. Enable automatic backup
Terminal window
# Full backup
mysqldump -u root -p --single-transaction --routines --triggers myapp > backup.sql
# Compressed backup
mysqldump -u root -p --single-transaction myapp | gzip > backup.sql.gz
# Restore
mysql -u root -p myapp < backup.sql
Terminal window
# Full backup
mongodump --uri="mongodb://admin:password@mongodb:27017/myapp?authSource=admin" \
--out=/backup/mongodb_$(date +%Y%m%d)
# Compressed backup
mongodump --uri="mongodb://admin:password@mongodb:27017/myapp?authSource=admin" \
--archive=/backup/myapp.archive --gzip
# Restore
mongorestore --uri="mongodb://admin:password@mongodb:27017/myapp?authSource=admin" \
/backup/mongodb_20240115/myapp/

Piora uses RClone to upload backups to cloud storage:

  1. In the dashboard, go to “Backup Settings” and add a storage destination
  2. Select the storage type (S3, R2, GCS, etc.)
  3. Enter the authentication details:
ParameterDescription
EndpointS3 endpoint URL
Access KeyAccess key
Secret KeySecret key
BucketStorage bucket name
RegionRegion (e.g., us-east-1)

To protect the security of your backup data, you can enable backup encryption:

  • Backup files are encrypted with AES-256 before upload
  • The encryption key is set and managed by you
  • The correct encryption key is required for restoration

The dashboard shows:

  • Recent backup records and statuses
  • Backup file sizes
  • Backup duration
  • Failed backups and error messages