fix btrbk formatting
This commit is contained in:
74
arch.md
74
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.
|
1. Grab the btrbk binary from the github repo. Copy it to /usr/local/bin/btrbk.
|
||||||
2. Create a snapshot config
|
2. Create a snapshot config
|
||||||
|
|
||||||
/etc/btrbk/snapshots.conf
|
/etc/btrbk/snapshots.conf
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
snapshot_preserve_min 24h
|
snapshot_preserve_min 24h
|
||||||
snapshot_preserve 14d
|
snapshot_preserve 14d
|
||||||
|
|
||||||
volume /mnt/btr_pools/root
|
volume /mnt/btr_pools/root
|
||||||
subvolume root
|
subvolume root
|
||||||
snapshot_dir .snapshots
|
snapshot_dir .snapshots
|
||||||
|
|
||||||
volume /mnt/btr_pools/root
|
volume /mnt/btr_pools/root
|
||||||
subvolume home
|
subvolume home
|
||||||
snapshot_dir .snapshots
|
snapshot_dir .snapshots
|
||||||
|
|
||||||
volume /mnt/btr_pools/root
|
volume /mnt/btr_pools/root
|
||||||
subvolume libvirt
|
subvolume libvirt
|
||||||
snapshot_dir .snapshots
|
snapshot_dir .snapshots
|
||||||
|
|
||||||
volume /mnt/btr_pools/root
|
volume /mnt/btr_pools/root
|
||||||
subvolume nextcloud
|
subvolume nextcloud
|
||||||
snapshot_dir .snapshots
|
snapshot_dir .snapshots
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Then create a snapshot service at /etc/systemd/system/btrbk_snapshots.service
|
3. Then create a snapshot service at /etc/systemd/system/btrbk_snapshots.service
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Runs btrbk with config file at /etc/btrbk/snapshots.conf
|
Description=Runs btrbk with config file at /etc/btrbk/snapshots.conf
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/btrbk -c /etc/btrbk/snapshots.conf -v run
|
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
|
4. Then create a timer for the service at /etc/systemd/system/btrbk_snapshots.timer
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run snapshots every hour
|
Description=Run snapshots every hour
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=hourly
|
OnCalendar=hourly
|
||||||
|
|
||||||
AccuracySec=10min
|
AccuracySec=10min
|
||||||
Persistent=true
|
Persistent=true
|
||||||
Unit=btrbk_snapshots.service
|
Unit=btrbk_snapshots.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=timers.target
|
WantedBy=timers.target
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Then enable the service
|
5. Then enable the service
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
systemctl enable --now btrbk_snapshots.conf
|
systemctl enable --now btrbk_snapshots.conf
|
||||||
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Bashrc
|
## Bashrc
|
||||||
|
|||||||
Reference in New Issue
Block a user