diff --git a/arch.md b/arch.md index afe7d85..65f785a 100644 --- a/arch.md +++ b/arch.md @@ -429,60 +429,62 @@ vpn likely won't activate. 1. Grab the btrbk binary from the github repo. Copy it to /usr/local/bin/btrbk. 2. Create a snapshot config -/etc/btrbk/snapshots.conf + /etc/btrbk/snapshots.conf -```conf -snapshot_preserve_min 24h -snapshot_preserve 14d + ```conf + snapshot_preserve_min 24h + snapshot_preserve 14d -volume /mnt/btr_pools/root - subvolume root - snapshot_dir .snapshots + volume /mnt/btr_pools/root + subvolume root + snapshot_dir .snapshots -volume /mnt/btr_pools/root - subvolume home - snapshot_dir .snapshots + volume /mnt/btr_pools/root + subvolume home + snapshot_dir .snapshots -volume /mnt/btr_pools/root - subvolume libvirt - snapshot_dir .snapshots + volume /mnt/btr_pools/root + subvolume libvirt + snapshot_dir .snapshots -volume /mnt/btr_pools/root - subvolume nextcloud - snapshot_dir .snapshots -``` + volume /mnt/btr_pools/root + subvolume nextcloud + snapshot_dir .snapshots + ``` 3. Then create a snapshot service at /etc/systemd/system/btrbk_snapshots.service -```conf -[Unit] -Description=Runs btrbk with config file at /etc/btrbk/snapshots.conf + ```conf + [Unit] + Description=Runs btrbk with config file at /etc/btrbk/snapshots.conf -[Service] -ExecStart=/usr/local/bin/btrbk -c /etc/btrbk/snapshots.conf -v run -``` + [Service] + ExecStart=/usr/local/bin/btrbk -c /etc/btrbk/snapshots.conf -v run + ``` 4. Then create a timer for the service at /etc/systemd/system/btrbk_snapshots.timer -```conf -[Unit] -Description=Run snapshots every hour + ```conf + [Unit] + Description=Run snapshots every hour -[Timer] -OnCalendar=hourly + [Timer] + OnCalendar=hourly -AccuracySec=10min -Persistent=true -Unit=btrbk_snapshots.service + AccuracySec=10min + Persistent=true + Unit=btrbk_snapshots.service -[Install] -WantedBy=timers.target -``` + [Install] + WantedBy=timers.target + ``` 5. Then enable the service -```bash -systemctl enable --now btrbk_snapshots.conf + ```bash + systemctl enable --now btrbk_snapshots.conf + ``` + ``` ## Bashrc