Haystack Arq 5 APFS Snapshot Backup
Arq 5 backup on macOS does not automatically create and back up from an APFS snapshot.
By configuring Arq preferences with before and after backup scripts, you can take an APFS snapshot, mount it and perform the backup from the snapshot, then unmount when finished. This way the backup is point-in-time consistent.
snapshot-before.sh
#!/usr/bin/env bash
diskutil unmount /tmp/snapshot
set -o errexit
tmutil localsnapshot
SNAPSHOT=$(tmutil listlocalsnapshots / | tail -n 1)
mkdir -p /tmp/snapshot
mount -t apfs -r -o -s=$SNAPSHOT / /tmp/snapshot
snapshot-after.sh
#!/usr/bin/env bash
set -o errexit
diskutil unmount /tmp/snapshot
Run snapshot-before.sh
manually and then in Arq select your home directory inside the snapshot as the directory to back up (/tmp/snapshot/Users/XXX
).
Written on December 26, 2018