I used to rely on my own shell scripts to back up different directories and files scattered around my system. They worked, but I was always tweaking them whenever something new came up. A while back, I discovered a tool called Restic and ran it in testing for about a year. It’s worked really well, so I’m writing down my setup here.
Restic does basically the same job my scripts did, but better ad more. My scripts kept a list of files and directories, and crontab would use that list to run the backups. Restic has features like remote server support, encryption, snapshots, and more.
Flow / Design
Two crontab steps with separate schedules:
### 1. run restic backup with file list
```mermaid
flowchart LR
A[Crontab Trigger] --> B
subgraph B[Restic Backup Script]
C[Restic Backup Uses Files List]
D[Restic repository on backup server\nusing a VeraCrypt-encrypted disk]
C --> D
end
```
### 2. run cloud backup
```mermaid
flowchart LR
A[Crontab Trigger] --> B
subgraph B[Cloud Backup Script]
C[Unmount VeraCrypt Images]
D[Rclone Copy VeraCrypt Images to Cloud]
E[Remount VeraCrypt Images]
C --> D --> E
end
```
No comments:
Post a Comment