diff options
Diffstat (limited to 'sh/upd')
| -rwxr-xr-x | sh/upd | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -120,6 +120,15 @@ backup () { # because I noticed that root user's `tty` output is different, but my # root user and xyz user's gpg keys are the same, so whatever for now. # There maybe a better way instead. + # + # Note that input password to `sudo --preserve-env=GPG_TTY duplicity + # --use-agent` with my mod-a dwm hotkey, which uses sth. like `pass + # master | ... | xdotool ...`, will have issues of timeout or it shows + # I input wrong password, I need to typing password manually instead, + # not sure why, maybe due to xdotool input too fast. It can be + # workarounded by add gpg key to agent before running duplicity, this + # works because my root and xyz user use the same gpg key. + echo | sudo --preserve-env=GPG_TTY gpg -s >/dev/null sudo --preserve-env=GPG_TTY duplicity --ssh-askpass --use-agent --encrypt-key 9790577D2BE328D46838117ED3F54FE03F3C68D6 --sign-key 05899270DF25BB1EEDF57BE824F769E5D08C9E9A --full-if-older-than 2Y --include /etc/.cfgs --include-filelist "/home/xyz/.config/myconf/upd_rsync_files" --exclude / / "sftp://xyz@ib.flylightning.xyz//home/xyz/backup/pp" # pp no need duplicity backup to ca, because 321 backup rule is already # satisfied: pp files in ~/.config/myconf/upd_rsync_files are backed up |
