Create a backup
Buuck keeps all of your data in one database. Create a backup of the database each day.
Write the backup to a file:
cd /opt/buuckdocker compose exec -T postgres sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > buuck-$(date +%F).sqlAlso create a copy of your .env file. Keep both files on a different machine.
Load a backup
Section titled “Load a backup”To load a backup into the database, use this command. Replace BACKUP-FILE with the name of the backup file:
cd /opt/buuckdocker compose exec -T postgres sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < BACKUP-FILE.sql