mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
feat: adjust btrbk's backups preserve policy, and disable backups...
This commit is contained in:
@@ -20,10 +20,17 @@
|
|||||||
# How often this btrbk instance is started. See systemd.time(7) for more information about the format.
|
# How often this btrbk instance is started. See systemd.time(7) for more information about the format.
|
||||||
onCalendar = "Tue,Fri,Sat,Sun *-*-* 3:45:20"; # daily at 3:45, except on Monday, Wednesday, and Thursday
|
onCalendar = "Tue,Fri,Sat,Sun *-*-* 3:45:20"; # daily at 3:45, except on Monday, Wednesday, and Thursday
|
||||||
settings = {
|
settings = {
|
||||||
# keep daily snapshots for 14 days
|
# how to prune local snapshots:
|
||||||
|
# 1. keep daily snapshots for xx days
|
||||||
snapshot_preserve = "9d";
|
snapshot_preserve = "9d";
|
||||||
# keep all snapshots for 2 days, no matter how frequently you (or your cron job) run btrbk
|
# 2. keep all snapshots for 2 days, no matter how frequently you (or your cron job) run btrbk
|
||||||
snapshot_preserve_min = "2d";
|
snapshot_preserve_min = "2d";
|
||||||
|
|
||||||
|
# hot to prune remote incremental baqckups:
|
||||||
|
# keep daily backups for 9 days, weekly backups for 4 weeks, and monthly backups for 2 months
|
||||||
|
target_preserve = "9d 4w 2m";
|
||||||
|
target_preserve_min = "no";
|
||||||
|
|
||||||
volume = {
|
volume = {
|
||||||
"/btr_pool" = {
|
"/btr_pool" = {
|
||||||
subvolume = {
|
subvolume = {
|
||||||
@@ -31,7 +38,10 @@
|
|||||||
snapshot_create = "always";
|
snapshot_create = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
target = "/snapshots";
|
|
||||||
|
# backup to a remote server or a local directory
|
||||||
|
# its prune policy is defined by `target_preserve` and `target_preserve_min`
|
||||||
|
# target = "/snapshots";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user