local/bin/homesync: Don't snapshot subvolumes, don't generate package lists.
parent
3261b72d7a
commit
82bc9d6a02
|
@ -58,27 +58,6 @@ message() {
|
||||||
echo -e "$YELLOW:: $@$NORMAL"
|
echo -e "$YELLOW:: $@$NORMAL"
|
||||||
}
|
}
|
||||||
|
|
||||||
section Snapshot subvolumes if older then 1 day
|
|
||||||
while IFS= read -r fs; do
|
|
||||||
for subvol in private public; do
|
|
||||||
last=$(ls -1 .snapshots/"$subvol" | tail -1 | sed 's/_/ /')
|
|
||||||
if [ -z "$last" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
last_date=$(date --date="$last" +%s)
|
|
||||||
now=$(date +%s)
|
|
||||||
if [ $(($now - $last_date)) -gt 86400 ]; then
|
|
||||||
message "Snapshot $fs/$subvol"
|
|
||||||
btrfs-snap "$fs/$subvol"
|
|
||||||
fi
|
|
||||||
unset now
|
|
||||||
unset last_date
|
|
||||||
unset last
|
|
||||||
done
|
|
||||||
done <<EOF
|
|
||||||
$(findmnt -t btrfs -n --output TARGET)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -n "$OPT_DATAROOT" ]; then
|
if [ -n "$OPT_DATAROOT" ]; then
|
||||||
section Data index
|
section Data index
|
||||||
for i in "$OPT_DATAROOT"/*; do
|
for i in "$OPT_DATAROOT"/*; do
|
||||||
|
@ -123,8 +102,9 @@ if [ -n "$OPT_DEVICE" ]; then
|
||||||
sudo cryptsetup close gpg_backup
|
sudo cryptsetup close gpg_backup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
section "$HOME/.package-lists"
|
## No need for package-list with Guix manifests.
|
||||||
package-lister
|
# section "$HOME/.package-lists"
|
||||||
|
# package-lister
|
||||||
|
|
||||||
if [ -f ~/.cache/emacs/eshell/history ]; then
|
if [ -f ~/.cache/emacs/eshell/history ]; then
|
||||||
section "Shell history"
|
section "Shell history"
|
||||||
|
|
Loading…
Reference in New Issue