File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ test
Original file line number Diff line number Diff line change 1+ test
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ WORKDIR=" $( cd " $( dirname " $0 " ) " ; pwd) " # <--
4+ # url path
5+ RSYNC_URL=" rsync://localhost:8873"
6+ BACKUPDIR=" $WORKDIR /RSFA_backups"
7+ node1=' root'
8+ node2=' sdcard'
9+ # rsync default options
10+ MIRROR=' -rlpt' # for root FS
11+ ARCHIVE=' -rt' # for sdcard FUSE FS
12+ INFO=' hi'
13+ # HASH='--checksum'
14+ PRUNE=' --delete'
15+ # PROGR='--progress'
16+
17+ case " $( basename " $0 " ) " in
18+ * backup* )
19+ ACTION=backup;;
20+ * restore* )
21+ ACTION=restore;;
22+ * test* )
23+ ACTION=test;;
24+ * )
25+ ACTION=test;;
26+ esac
27+
28+ for _f in $node1 $node2 ; do
29+ mkdir -p " $BACKUPDIR /$_f " 2> /dev/null
30+ done
31+
32+
33+
34+ case " $ACTION " in
35+ backup)
36+ rsync $ARCHIVE$INFO $HASH $PRUNE $PROGR --exclude=' .$Trash$/' --exclude=' Android/' " $RSYNC_URL /$node2 /" " $BACKUPDIR /$node2 /"
37+ ;;
38+ restore)
39+ rsync $ARCHIVE$INFO $HASH $PROGR --exclude=' .$Trash$/' --exclude=' Android/' " $BACKUPDIR /$node2 /" " $RSYNC_URL /$node2 /"
40+ ;;
41+ test)
42+ rsync --list-only $RSYNC_URL
43+ ;;
44+ esac
You can’t perform that action at this time.
0 commit comments