-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup_from_home_new
executable file
·39 lines (35 loc) · 1.09 KB
/
backup_from_home_new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
#
SOURCE_VOL=fela
SOURCE_DRIVE=f
BACKUP_VOL=clash
BACKUP_DRIVE=g
cd /mnt
g_str=$(cat $BACKUP_DRIVE/VOLUME.txt)
f_str=$(cat $SOURCE_DRIVE/VOLUME.txt)
if [ "$f_str" != ${SOURCE_VOL} ]; then
echo "/mnt/$SOURCE_DRIVE is not ${SOURCE_VOL} volume"
exit 1
else
echo found ${SOURCE_VOL}
fi
if [ "$g_str" != ${BACKUP_VOL} ]; then
echo "/mnt/$BACKUP_DRIVE is not ${BACKUP_VOL} volume"
exit 1
else
echo found ${BACKUP_VOL}
fi
# copy from home (Blondie) to Elvis
rsync -av --delete --ignore-errors ${BACKUP_DRIVE}/backup ${SOURCE_DRIVE}/from_home
exit
# copy itunes back
## rsync -av --delete --ignore-errors ${SOURCE_VOL}/itunes ${BACKUP_VOL}/andrew_itunes
# copy docs to andrew_docs
## rsync -av --delete --ignore-errors ${SOURCE_VOL}/docs ${BACKUP_VOL}/andrew_docs
## echo any music in the wrong place?
## gfind '/Users/asherman/Music/iTunes/iTunes Media/Music'
## echo would be listed above
# copy git stuff
## rsync -av --delete --ignore-errors ${SOURCE_VOL}/backups ${BACKUP_VOL}/git_backups
# backup local docs
## rsync -av --delete --ignore-errors ~/Documents ${BACKUP_VOL}/mac_docs