summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2025-07-12 20:47:11 +0800
committerXiao Pan <xyz@flylightning.xyz>2025-07-12 20:47:11 +0800
commit126a6dd5c06d8cdc47013f77a06bdf462b800e3e (patch)
tree02bacf660774b16abf36f297b50fc19c3b0a2f5b /sh
parentc1906b8b698d2a677a532b9d595a32d5b6c337c3 (diff)
upd: correct comments about backup
Diffstat (limited to 'sh')
-rwxr-xr-xsh/upd6
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/upd b/sh/upd
index 1420958..4a20aac 100755
--- a/sh/upd
+++ b/sh/upd
@@ -52,7 +52,7 @@ backup () {
(
umask 077
- # not needed for backup because I use insp for cfgs gitolite remote now, but I still want to sync the local dir to work on it
+ # need to pull VPS cfgs repos (ca, ib, ba, etc.) to /root/programs for insp to rsync to external HDD to satisfy 321 backup rule
for dir in $(sudo find /root/programs -maxdepth 1 -mindepth 1 -type d -name 'config_local_arch_secrets*'); do
sudo -E git -C "$dir" pull
done
@@ -76,6 +76,8 @@ backup () {
# TODO: first time mkdir, chown, chmod proper dirs in /run/media/xyz/bd0, see vq notes
# backup insp
rsync -avPRr --delete --files-from="$XDG_CONFIG_HOME/myconf/upd_rsync_files" / "/run/media/xyz/bd0/master"
+ # need to backup VPS cfgs repos (ca, ib, ba, etc.) in /root/programs to external HDD to satisfy 321 backup rule
+ # need to backup insp cfgs repo to external HDD to satisfy 321 backup rule
sudo rsync -avPR --delete /etc/.cfgs /root/archive /root/programs "/run/media/xyz/bd0/master_root"
# backup ib
rsync -avP --delete "$HOME/backup/ib/" "/run/media/xyz/bd0/ib"
@@ -85,7 +87,7 @@ backup () {
alarm 0 'Unplug external HDD'
# duplicity backup to ib
- # note no need to duplicity backup /root/programs to ib for now, because /root/programs now only has cfgs repos which already satisfied 321 backup rule, e.g, insp cfgs is backed with: insp, duplicty backuped with /etc/.cfgs, rsync backup to external drive
+ # note no need to duplicity backup /root/programs to ib for now, because /root/programs now only has cfgs repos which already satisfied 321 backup rule, e.g, insp cfgs is backed up with: insp, duplicty backuped with /etc/.cfgs, rsync backup to external HDD; ib cfgs is backed up with: ib, insp gitolite, insp rsync backup /root/programs to external HDD
# https://wiki.archlinux.org/title/Duplicity
# Need // for absolute path, see manpage URL FORMAT section. If not use //, will store to /home/xyz/home/xyz/...
# --files-from has a bug, this bug makes source url that is / not working while /home works, more see vq notes