This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Backup

    Learn how to backup your database and files in Piglet Run.

    Overview

    Piglet Run provides multiple backup methods to protect your data:

    • Database Backup: Full and incremental PostgreSQL backups
    • File Backup: User files and configurations
    • Snapshot: Complete system state capture

    Quick Backup

    Create a full backup with a single command:

    pig backup create
    

    Backup Database

    Full Database Backup

    pig backup db --full
    

    Incremental Backup

    pig backup db --incremental
    

    Backup Specific Database

    pig backup db mydb
    

    Backup Files

    Backup User Files

    pig backup files
    

    Backup Configurations

    pig backup config
    

    Scheduled Backups

    Configure automatic backups in /etc/piglet/backup.yml:

    backup:
      schedule: "0 2 * * *"  # Daily at 2 AM
      retention: 7           # Keep 7 days
      type: incremental
    

    Backup Storage

    Backups are stored in:

    TypeLocation
    Database/data/backup/postgres/
    Files/data/backup/files/
    Config/data/backup/config/

    Next Steps