diff options
author | Andreas Fankhauser hiddenalpha.ch | 2022-12-29 01:38:49 +0100 |
---|---|---|
committer | Andreas Fankhauser hiddenalpha.ch | 2022-12-29 01:38:49 +0100 |
commit | 26c678bd09379bcb97f6e92392a8052bb968df80 (patch) | |
tree | a40b57f0ec697a879c01a792514d58983b24818b | |
parent | e6c078d07ada15a9fa4315a6ee401c6e5d064f97 (diff) | |
download | UnspecifiedGarbage-26c678bd09379bcb97f6e92392a8052bb968df80.zip UnspecifiedGarbage-26c678bd09379bcb97f6e92392a8052bb968df80.tar.gz |
(bkup-rsync) Include git-heads. Add more parents to dst.
-rwxr-xr-x | src/main/shell/BackupByRsync/backup.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/shell/BackupByRsync/backup.sh b/src/main/shell/BackupByRsync/backup.sh index 00f3a38..f934f1b 100755 --- a/src/main/shell/BackupByRsync/backup.sh +++ b/src/main/shell/BackupByRsync/backup.sh @@ -4,14 +4,16 @@ # Inspired by: # https://linuxconfig.org/how-to-create-incremental-backups-using-rsync-on-linux # +# mount /dev/sdx1 /mnt/x +# set -o errexit set -o pipefail readonly NOW_SHORT="$(date -u '+%Y%m%d-%H%M%S')" -readonly DIR_FROM="${HOME:?}/." -readonly DIR_TO="/home/andreas/tmp/my-psydo-bkup" -readonly BACKUP_PATH="${DIR_TO}/${NOW_SHORT}" +readonly DIR_FROM="/home/${USER:?}/." +readonly DIR_TO="/mnt/d/ssd512g/bkup-rsync/tux-six" +readonly BACKUP_PATH="${DIR_TO}/${NOW_SHORT}/home/${USER:?}" readonly LATEST_LINK="${DIR_TO}/latest" @@ -49,6 +51,8 @@ run () { --link-dest "${LATEST_LINK:?}" \ --filter=':- .gitignore' \ --exclude=".git" \ + --include=".git/HEAD" \ + --include=".git/refs/heads" \ --exclude=".idea" \ --exclude="/.NERDTreeBookmarks" \ --exclude="/.Xauthority" \ |