summaryrefslogtreecommitdiff
path: root/home/xyz/.local
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-11-23 00:41:39 -0800
committerXiao Pan <gky44px1999@gmail.com>2023-11-23 00:41:39 -0800
commit51cf9201d8830bd8e9ae23740d989c94bdef0db7 (patch)
tree3d0a6e064f4bdca6912c0227869ebaed4ea82f7f /home/xyz/.local
parent298fa79c312208c77a630985f94b08ef9af7ec84 (diff)
swtich from external HDD backup to studio server bakcup
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-xhome/xyz/.local/bin/upd15
1 files changed, 4 insertions, 11 deletions
diff --git a/home/xyz/.local/bin/upd b/home/xyz/.local/bin/upd
index b4147d14..56e361dc 100755
--- a/home/xyz/.local/bin/upd
+++ b/home/xyz/.local/bin/upd
@@ -6,11 +6,13 @@ all () {
clean
refl
music
- usb
backup
}
backup () {
+ # --files-from make -a not imply -r, so need to specify explicitly
+ rsync -avPRr --delete --files-from="$XDG_CONFIG_HOME/myconf/upd_rsync_files" / studio:/home/xyz/backup
+
# 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
@@ -101,14 +103,6 @@ refl () {
sudo reflector --verbose --save /etc/pacman.d/mirrorlist --country us --protocol https --delay 1 --latest 25 --score 25 --fastest 10
}
-usb () {
- cfg -s push
-
- #rsync -navPR --delete ~/archive ~/documents ~/downloads ~/music ~/pictures ~/programs ~/test ~/videos ~/.local/share/stardict/dic ~/.local/share/qBittorrent ~/.local/share/sdcv_history ~/.cache/nsxiv ~/.config/qBittorrent ~/.bitmonero/wallets ~/.password-store /run/media/xyz/bd0
- # --files-from make -a not imply -r, so need to specify explicitly
- rsync -avPRr --delete --files-from="$XDG_CONFIG_HOME/myconf/upd_rsync_files" / /run/media/xyz/bd0
-}
-
music () {
yt-dlp -f 'bestaudio[ext=opus]/bestaudio' --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks
}
@@ -116,7 +110,7 @@ music () {
if [ $# -eq 0 ]; then
fast
else
- while getopts abcfjmMpru opt; do
+ while getopts abcfjmMpr opt; do
case $opt in
a)all;;
b)backup;;
@@ -127,7 +121,6 @@ else
M)music;;
p)pac;;
r)refl;;
- u)usb;;
\?)exit 1;;
esac
done