3 ms·
Thanks, sounds interesting. So you create a snapshot, then let kopia process that snapshot rather than the live filesystem, and then remove the snapshot? > I s
by magicalhippo 2y ago
Thanks, sounds interesting. So you create a snapshot, then let kopia process that snapshot rather than the live filesystem, and then remove the snapshot?
> I suppose if it only walked files it knew were changed it would be a lot faster.
Right, for me I'd want to set it up to do the full disk, so could be millions of files and hundreds of GB. But this trick should work with other backups software, so perhaps it's a viable option.
- _flux 2y agoExactly so. Here's the script, should it be of benefit to someone, even if it of course needs to be modified: #!/bin/sh success=false teardown() { umount /mnt/backup/var/lib/docker || true umount /mnt/backup/root/.cache || true umount /mnt/backup/ || true for lv in root docker-data; do lvremove --yes /dev/hass-vg/$lv-snapshot || true done if [ "$1" != "no-exit" ]; then $success exit $? fi } set -x set -e teardown no-exit trap teardown EXIT for lv in root docker-data; do lvcreate --snapshot -L 1G -n $lv-snapshot /dev/hass-vg/$lv done mount /dev/hass-vg/root-snapshot /mnt/backup mount /dev/hass-vg/docker-data-snapshot /mnt/backup/var/lib/docker mount /root/.cache /mnt/backup/root/.cache -o bind chroot /mnt/backup kopia --config-file="/root/.config/kopia/repository.config" --log-dir="/root/.cache/kopia" snap create / /var/lib/docker kopia --config-file="/root/.config/kopia/repository.config" --log-dir="/root/.cache/kopia" snap create /boot /boot/efi success=true
- magicalhippo 2y agoAwesome, thanks!