# only make a snapshot if things have changed
snapshot_create onchange
-# much less snapshots because I have less space on the
-# local filesystem.
-#snapshot_preserve 2h 2d
-# for now, keeping them equal for simplicity sake
-snapshot_preserve 48h 14d 8w 24m
-snapshot_preserve_min 6h
+# 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 48h 14d 8w 24m
-target_preserve_min 6h
+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
case $distro in
- debian|ubuntu) spa android-tools-adb/unstable ;;
+ debian|ubuntu) spa android-tools-adbd/unstable ;;
arch) spa android-tools ;;
# other distros unknown
esac
alertnotify=curl -sI --connect-timeout 1 http://localhost:62602/alertnotify?%s
EOF
;;
- # other distros unknown
+ # other distros unknown
esac
if [[ $HOSTNAME == treetowl ]]; then
pi libsodium-dev python3-pip
# run "control userpasswords2", turn on automatic login.
# note: when changing devices, I just undefine, the create the vm again.
- s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
- --disk=/a/images/win10.qcow2,bus=virtio --vcpus 2 -r 4096 -w bridge=br0 \
- -n win10 --import --os-variant $variant --cpu host-model-only
-
- s virsh destroy win10
+ if [[ -e /a/images/win10.qcow2 ]]; then
+ s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
+ --disk=/a/images/win10.qcow2,bus=virtio --vcpus 2 -r 4096 -w bridge=br0 \
+ -n win10 --import --os-variant $variant --cpu host-model-only
- # this one hasn\'t had the virtio fix done yet.
- s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
- --disk=/a/images/win7.qcow2 --vcpus 2 -r 4096 -w bridge=br0 \
- -n win7 --import --os-variant win7 --cpu host-model-only
- s virsh destroy win7
- # had a problem with --cpu host, so trying out
- # --cpu host-model-only
+ s virsh destroy win10
+ fi
+ if [[ -e /a/images/win7.qcow2 ]]; then
+ # this one hasn\'t had the virtio fix done yet.
+ s virt-install --noautoconsole --graphics spice,listen=0.0.0.0 \
+ --disk=/a/images/win7.qcow2 --vcpus 2 -r 4096 -w bridge=br0 \
+ -n win7 --import --os-variant win7 --cpu host-model-only
+ s virsh destroy win7
+ # had a problem with --cpu host, so trying out
+ # --cpu host-model-only
+ fi
fi