Skip to content

Commit

Permalink
Update ignore directories
Browse files Browse the repository at this point in the history
  • Loading branch information
yantene committed Feb 10, 2020
1 parent 341318c commit 76b5c5d
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions setup.sh
Expand Up @@ -81,6 +81,17 @@ mount -o $linux_root_mntopts $linux_root /mnt
btrfs subvolume create root
btrfs subvolume set-default `btrfs subvol list -p . | cut -d' ' -f2` .
btrfs subvolume create root/home

# set the directories not to be backed up
mkdir -p ./root/{home/${USERNAME},opt,usr,var/{,lib}}
btrfs subvolume create root/home/${USERNAME}/x # user's temporary directory
btrfs subvolume create root/home/${USERNAME}/.cache
btrfs subvolume create root/opt
btrfs subvolume create root/usr
btrfs subvolume create root/var/cache
btrfs subvolume create root/var/db
btrfs subvolume create root/var/lib/docker
btrfs subvolume create root/var/log
)
umount /mnt

Expand Down Expand Up @@ -207,20 +218,4 @@ $CHROOT bash -c "
sed -i -e '\$d' /etc/sudoers
"

# set the directories not to be backed up

mount -o $linux_root_mntopts $linux_root /mnt
(
cd /mnt
btrfs subvolume create root/home/${USERNAME}/x # user's temporary directory
btrfs subvolume create root/home/${USERNAME}/.cache
btrfs subvolume create root/opt
btrfs subvolume create root/usr
btrfs subvolume create root/var/cache
btrfs subvolume create root/var/db
btrfs subvolume create root/var/lib/docker
btrfs subvolume create root/var/log
)
umount /mnt

set +x

0 comments on commit 76b5c5d

Please sign in to comment.