Types of backup

1 - Entire System backup 2 - system states and configurations 3 - Data 4 - VMs

Storage Backends: Local: HDD Cloud: Backblaze B2

Tools: Backup: Restic Monitoring: Testing: Analysis:

Current Solutions

chezmoi + Github: Dotfiles managed by chezmoi are automatically pushed to Github on every change

Disk Backup

Preparation

  • Ensure Restic is installed on the system.
  • Confirm sufficient storage space is available for backups.
  • Obtain administrative or superuser access.

Initialization

  • Run restic -r /path/to/backup/repository init to initialize a new Restic repository.
  • Set and remember the password for the new Restic repository.

Test Backup

  • Execute restic -r /path/to/backup/repository backup /path/to/folder to run a test backup.
  • Verify that the test backup is successful.

Automate Backup (Choose based on your OS)

For Linux/Unix:

  • Open the cron table using crontab -e.
  • Add cron job: 0 2 * * * /usr/bin/restic -r /path/to/backup/repository --password-file /path/to/password.txt backup /path/to/folder.

For Windows:

  • Open Windows Task Scheduler and create a new task.
  • In “Actions,” add a new action with the Restic command.
  • Set the trigger to run the backup daily or as needed.

Test Automation

  • Manually trigger the cron job or Windows Task to test that the backup runs as scheduled.

Verification

  • Run restic -r /path/to/backup/repository --password-file /path/to/password.txt snapshots to list all snapshots.
  • Confirm that the scheduled backup appears in the list.

Troubleshooting

  • Ensure folder and backup repository permissions are set correctly.
  • Regularly check logs and notifications to confirm backups are functioning as expected.