Skip to content

Instantly share code, notes, and snippets.

@chungy
Created June 28, 2019 18:24
Show Gist options
  • Save chungy/f63384c76cca1a43fed17ec531c1299c to your computer and use it in GitHub Desktop.
Save chungy/f63384c76cca1a43fed17ec531c1299c to your computer and use it in GitHub Desktop.
[ExclusionList]
/lost+found
/*/.cache
/*/.local/share/Trash
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
zfs set readonly=off usb/backup
CUR_DATE=$(date +%Y%m%d)
umask 77
lvcreate -p r -s ace/root -l 936 -n root_snap
lvcreate -p r -s ace/home -l 936 -n home_snap
mount -r /dev/ace/root_snap /mnt
wimappend --quiet --unix-data --update-of=-2 --config=backup.conf /mnt system.wim root_${CUR_DATE}
umount /mnt
mount -r /dev/ace/home_snap /mnt
wimappend --quiet --unix-data --update-of=-2 --config=backup.conf /mnt system.wim home_${CUR_DATE}
umount /mnt
lvremove -y ace/root_snap
lvremove -y ace/home_snap
zfs set readonly=on usb/backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment