Mercurial > repos > other > usr-local-bin
annotate do-backup @ 27:c7621908cb47
Try to manage disk usage for backup
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 07 Mar 2020 16:37:38 +0000 |
parents | 489ba6ea3c35 |
children | 737061eac1d0 |
rev | line source |
---|---|
0 | 1 #! /bin/sh |
2 | |
3 if [ $# -ne 1 ]; then | |
4 echo "Usage: $0 <dest>" >&2 | |
5 exit 1 | |
6 elif [ ! -d "$1" ]; then | |
7 echo "Destination $1 did not exist/was not a directory" >&2 | |
8 exit 1 | |
9 fi | |
10 | |
11 DISK="$1" | |
12 RSYNC_ARGS=${RSYNC_ARGS:-} | |
23
489ba6ea3c35
Add some more directories to back up
IBBoard <dev@ibboard.co.uk>
parents:
14
diff
changeset
|
13 rsync -av $RSYNC_ARGS --exclude=.thumbnails --exclude=temp --exclude=banshee.db --exclude=.cache --exclude=.local/share/Trash \ |
27
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
14 --exclude=.local/share/Steam --include=.local/share/Steam/userdata/ --exclude=.SpiderOak \ |
23
489ba6ea3c35
Add some more directories to back up
IBBoard <dev@ibboard.co.uk>
parents:
14
diff
changeset
|
15 --exclude=.wine --exclude=.wine32 --exclude=.local/share/*/game/ --exclude=.config/Code/ --exclude=.vscode/ --include=Projects/dev \ |
489ba6ea3c35
Add some more directories to back up
IBBoard <dev@ibboard.co.uk>
parents:
14
diff
changeset
|
16 --include=Projects/master/ --include=Projects/SevenLanguagesInSevenWeeks/ --include=Projects/DoW/ --include=Projects/*.patch --exclude=Projects/* \ |
489ba6ea3c35
Add some more directories to back up
IBBoard <dev@ibboard.co.uk>
parents:
14
diff
changeset
|
17 /home/ibboard "$DISK"/ |
27
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
18 rsync -av $RSYNC_ARGS --exclude=Videos/Other --include=Downloads/games --include=Downloads/M4Ps --exclude=Downloads/* --exclude=.Trash-1000 \ |
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
19 --exclude=.Trash-1001 --exclude=Pictures/PhotoTemp --exclude=Pictures/AlbumArtCollection/ --exclude=Pictures/WarhammerArt/ --include=Pictures/*.xcf \ |
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
20 --exclude=Pictures/*.* --exclude=VirtualBox/VBoxGuestAdditions* --exclude=SteamExtras/ --exclude=VirtualBox \ |
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
21 --exclude=Documents/ebooks/mobi --exclude=Documents/ebooks/pdf --exclude=Documents/ebooks/*/mobi --exclude=Documents/ebooks/*/pdf \ |
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
22 --exclude=Documents/ebooks/Software/videos --exclude=Documents/Games\ Workshop/LivingRuleBooks \ |
c7621908cb47
Try to manage disk usage for backup
IBBoard <dev@ibboard.co.uk>
parents:
23
diff
changeset
|
23 /mnt/media "$DISK"/ |
0 | 24 rsync -av $RSYNC_ARGS /usr/local/bin "$DISK"/ |
25 |