Skip to content

Backup

Backing up servers properly: database dumps, encrypted and deduplicated backups with restic and borg, retention and, above all, testing the restore.

Basics: The 3-2-1 rule, what to back up, restic or borg, and a complete backup routine

Database dumps

  • pg_dump


    Back up PostgreSQL while it runs.

  • mysqldump


    Back up MySQL and MariaDB.

Backup tools

  • restic


    Encrypted backups, also to the cloud.

  • borg


    Deduplicated archives over SSH.

From other chapters

  • tar


    Simple archives for one-off copies. Covered in the chapter Archives.

  • rsync


    Mirror directories to another server. Covered in the chapter SSH.

  • crontab


    Run the backup every night. Covered in the chapter Scheduling.

  • age


    Encrypt single backup files. Covered in the chapter Certificates and encryption.