add btrbk configs
This commit is contained in:
109
pc_fedora.md
109
pc_fedora.md
@@ -18,6 +18,115 @@ protect.
|
||||
9. On the faster 1TB drive create an unencrypted btrfs partition and mount it at "/steam"
|
||||
10. Click "Done" and begin installation
|
||||
|
||||
## btrbk
|
||||
|
||||
```bash
|
||||
sudo dnf install btrbk
|
||||
```
|
||||
|
||||
As usual, you'll need a snapshot service and backup service. These get more complicated
|
||||
with multi-drive mounts (but actually easier at the same time since each volume is self-
|
||||
contained).
|
||||
|
||||
/etc/btrbk/btrbk_snapshots.conf
|
||||
|
||||
```conf
|
||||
snapshot_preserve_min 24h
|
||||
snapshot_preserve 24h 14d
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume root
|
||||
snapshot_dir root/.snapshots
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume home
|
||||
snapshot_dir home/.snapshots
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume steam
|
||||
snapshot_dir steam/.snapshots
|
||||
```
|
||||
|
||||
/etc/btrbk/btrbk_backup.conf
|
||||
|
||||
```conf
|
||||
snapshot_preserve_min all
|
||||
snapshot_create no
|
||||
target_preserve_min no
|
||||
target_preserve 24h 7d 4w *m
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume root
|
||||
snapshot_dir root/.snapshots
|
||||
target /mnt/backup/root
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume home
|
||||
snapshot_dir home/.snapshots
|
||||
target /mnt/backup/home
|
||||
|
||||
volume /mnt/btr_pools
|
||||
subvolume steam
|
||||
snapshot_dir steam/.snapshots
|
||||
target /mnt/backup/steam
|
||||
```
|
||||
|
||||
Then you'll need a service to run btrbk_snapshots and btrbk_backup.
|
||||
|
||||
/etc/systemd/system/btrbk_snapshots.service
|
||||
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Runs btrbk with config file at /etc/btrbk/btrbk_snapshots.conf
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/btrbk -c /etc/btrbk/btrbk_snapshots.conf -v run
|
||||
```
|
||||
|
||||
/etc/systemd/system/btrbk_backup.service
|
||||
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Runs btrbk with config file at /etc/btrbk/btrbk_backup.conf
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/btrbk -c /etc/btrbk/btrbk_backup.conf -v run
|
||||
```
|
||||
|
||||
And timers to run the btrbk services on a regular schedule.
|
||||
|
||||
/etc/systemd/system/btrbk_snapshots.timer
|
||||
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Run btrbk_snapshots every hour
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
AccuracySec=10min
|
||||
Persistent=true
|
||||
Unit=btrbk_snapshots.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
```
|
||||
|
||||
/etc/systemd/system/btrbk_backup.timer
|
||||
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Run btrbk_backup every hour
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
AccuracySec=10min
|
||||
Persistent=true
|
||||
Unit=btrbk_backup.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
```
|
||||
|
||||
## RDP with autologin
|
||||
|
||||
https://askubuntu.com/questions/1396745/21-10-make-screen-share-password-permanent
|
||||
|
||||
Reference in New Issue
Block a user