-# only make a snapshot if things have changed
-snapshot_create onchange
-# I could make this different from target_preserve,
-# if one disk had less space.
-# for now, keeping them equal.
-snapshot_preserve 36h 14d 8w 24m
-snapshot_preserve_min 4h
-snapshot_dir btrbk
-
-# so, total backups = ~89
-target_preserve 36h 14d 8w 24m
-target_preserve_min 4h
-
-# if something fails and it's not obvious, try doing
-# btrbk -l debug -v dryrun
-
-
-EOF
-
-
-if $localhost_new; then
- btrbk_src=ssh://$old_host/mnt/root
- btrbk_dst=/mnt/root/btrbk
-else
- btrbk_src=/mnt/root
- btrbk_dst=ssh://$new_host/mnt/root/btrbk
-fi
-
-sudo tee -a /etc/btrbk.conf <<EOF
-volume $btrbk_src
-subvolume o
-target send-receive $btrbk_dst
-EOF
-
-
-sudo btrbk -l debug --progress run
-$new_shell mount-latest-subvol
-
-mail-setup "$new_shell"
-
-if $restore_new_btrbk; then
- $new_shell sudo systemctl start btrbk.timer
-fi
-if $restore_old_btrbk; then
- $old_shell sudo systemctl start btrbk.timer
+e Running main btrbk
+m btrbk-run -v $bbk_args -m /o || ret=$?
+if (( ret )); then
+ bang="$(printf "$(tput setaf 5)█$(tput sgr0)%.0s" 1 2 3 4 5 6 7)"
+ e $bang failed btrbk of /o. restoring old host as primary
+ m $old_shell /a/exe/primary-setup localhost
+ mexit $ret