Updated for nself v1.0.12
Learn how to back up and restore your ɳSelf database with scheduled automation, point-in-time recovery, and safe rollback procedures.
nself backup create # Create a backup now
nself backup list # Show all backups
nself backup restore <backup-id> # Restore a specific backup
nself backup verify # Verify backup integrity
nself backup prune # Remove old backups per retention policy
nself backup status # Show backup system health
nself backup schedule # Configure automated backups# Create a backup immediately
nself backup create
# Output:
# Creating backup... done
# Backup ID: bak_20260427_143022
# Size: 42 MB
# Location: /var/nself/backups/bak_20260427_143022nself backup list
# Output:
# ID Created Size Status
# bak_20260427_143022 2026-04-27 14:30 42 MB ok
# bak_20260426_020000 2026-04-26 02:00 41 MB ok
# bak_20260425_020000 2026-04-25 02:00 40 MB ok# Restore from a specific backup ID
nself backup restore bak_20260426_020000
# Interactive restore with confirmation
nself backup restore bak_20260426_020000 --confirmNote: Restore replaces your current database with the backup. All data written after the backup point will be lost. Create a fresh backup before restoring if you may need to undo the restore.
# Verify the most recent backup
nself backup verify
# Verify a specific backup
nself backup verify bak_20260426_020000
# Output:
# Verifying bak_20260426_020000...
# Checksum: ok
# Restore test: ok
# Backup is validConfigure a schedule so backups run automatically:
# Open the schedule configuration
nself backup schedule
# Or set directly via env vars in .env:
BACKUP_ENABLED=true
BACKUP_SCHEDULE=0 2 * * * # Daily at 2am (cron syntax)
BACKUP_RETENTION_DAYS=30# Remove backups older than the retention policy
nself backup prune
# Remove backups older than N days (override policy)
nself backup prune --keep-days 14nself backup status
# Output:
# Backup system: enabled
# Schedule: daily at 02:00
# Last backup: 2026-04-27 14:30 (bak_20260427_143022, 42 MB, ok)
# Next backup: 2026-04-28 02:00
# Retention: 30 days
# Total backups: 3 (stored), 0 (failed)For production disaster recovery procedures including off-site storage and multi-server restore flows, see the Disaster Recovery guide.
nself backup verify on a schedulenself backup create before migrations or major plugin installs