iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes, and dns debugging on bk
[distro-setup]
/
btrbk-run
diff --git
a/btrbk-run
b/btrbk-run
index c83b76354a15b3c253e51350af31edb51e5a4784..1137a72b9c85bc434bf7168ea46c331cd8c7016f 100644
(file)
--- a/
btrbk-run
+++ b/
btrbk-run
@@
-175,13
+175,13
@@
if [[ ! -v targets && ! $source ]]; then
kw)
at_work=true
;;&
kw)
at_work=true
;;&
- x2|x3|sy)
+ x2|x3|sy
|bo
)
if ping -q -c1 -w1 hal.office.fsf.org \
&& ip n show 192.168.0.26 | grep . &>/dev/null; then
at_work=true
fi
;;&
if ping -q -c1 -w1 hal.office.fsf.org \
&& ip n show 192.168.0.26 | grep . &>/dev/null; then
at_work=true
fi
;;&
- kw|x2|x3|sy)
+ kw|x2|x3|sy
|bo
)
if $at_work; then
if ping -q -c1 -w1 iank.vpn.office.fsf.org &>/dev/null; then
home=iank.vpn.office.fsf.org
if $at_work; then
if ping -q -c1 -w1 iank.vpn.office.fsf.org &>/dev/null; then
home=iank.vpn.office.fsf.org
@@
-195,7
+195,7
@@
if [[ ! -v targets && ! $source ]]; then
kw)
targets+=($home x3)
;;
kw)
targets+=($home x3)
;;
- x2|x3|sy)
+ x2|x3|sy
|bo
)
targets+=($home)
if $at_work; then
targets+=(kw.office.fsf.org x2.b8.nz)
targets+=($home)
if $at_work; then
targets+=(kw.office.fsf.org x2.b8.nz)
@@
-205,12
+205,11
@@
if [[ ! -v targets && ! $source ]]; then
;;
kd)
targets+=(x2.b8.nz kw.b8.nz)
;;
kd)
targets+=(x2.b8.nz kw.b8.nz)
- ## sy is unused
- # if ping -q -c1 -w1 sy.b8.nz &>/dev/null; then
- # targets+=(sy.b8.nz)
- # else
- # targets+=(syw.b8.nz)
- # fi
+ if ping -q -c1 -w1 sy.b8.nz &>/dev/null; then
+ targets+=(sy.b8.nz)
+ else
+ targets+=(syw.b8.nz)
+ fi
;;
frodo)
# no targets
;;
frodo)
# no targets
@@
-246,7
+245,7
@@
else
prospective_mps=(/i)
;;
*)
prospective_mps=(/i)
;;
*)
- prospective_mps=(
/a /q
)
+ prospective_mps=()
if [[ $source ]]; then
source_state="$(ssh $source cat /a/bin/bash_unpublished/source-state)"
eval "$source_state"
if [[ $source ]]; then
source_state="$(ssh $source cat /a/bin/bash_unpublished/source-state)"
eval "$source_state"
@@
-264,6
+263,9
@@
else
fi
fi
fi
fi
fi
fi
+ # note: put q last just in case its specific retention options were to
+ # affect other config sections. I havent tested if that is the case.
+ prospective_mps+=(/a /q)
;;
esac
fi
;;
esac
fi
@@
-423,7
+425,6
@@
snapshot_create onchange
snapshot_preserve 18h 14d 8w 24m
snapshot_preserve_min 2h
snapshot_dir btrbk
snapshot_preserve 18h 14d 8w 24m
snapshot_preserve_min 2h
snapshot_dir btrbk
-
# so, total backups = ~58
target_preserve 18h 14d 8w 24m
target_preserve_min 2h
# so, total backups = ~58
target_preserve 18h 14d 8w 24m
target_preserve_min 2h
@@
-455,6
+456,18
@@
EOF
volume $vol
subvolume $sub
EOF
volume $vol
subvolume $sub
EOF
+ case $sub in
+ q)
+ # q has sensitive data i dont want to backup for so long
+ cat >>/etc/btrbk.conf <<EOF
+snapshot_preserve 18h 14d
+snapshot_preserve_min 2h
+snapshot_dir btrbk
+target_preserve 18h 14d
+target_preserve_min 2h
+EOF
+ ;;
+ esac
for tg in ${targets[@]}; do
# handle ipv6
if [[ $tg == *:* ]]; then
for tg in ${targets[@]}; do
# handle ipv6
if [[ $tg == *:* ]]; then