From 0be1ba56e601a89867b6d165e36b11cc57b9265d Mon Sep 17 00:00:00 2001 From: Carlo Abelli Date: Sat, 17 Feb 2024 16:26:03 -0500 Subject: [PATCH] backup modified system files --- backup | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backup b/backup index 17bd864..df5bfc3 100755 --- a/backup +++ b/backup @@ -10,12 +10,23 @@ dir="$1" comm -23 <(pacman -Qqe | sort) \ <((echo base; pacman -Qqg base-devel) | sort) \ > "$dir/packages.txt" + +sudo rm -rf "$dir/system" +sudo mkdir -p "$dir/system" +sudo rsync -arR \ + --progress \ + $(pacman -Qii | awk '/^MODIFIED/ {print $2}') \ + $(sudo lostfiles) \ + "$dir/system" + +mkdir -p "$dir/$(basename "$HOME")" rsync -ar \ --delete-excluded \ --files-from="$HOME/.config/backup/config" \ --filter ":-n .gitignore" \ --progress \ - "$HOME" "$dir/$(basename "$HOME")" + "$HOME" \ + "$dir/$(basename "$HOME")" function is_btrfs_subvolume { local dir="$1" -- 2.45.2