Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 80 lines (70 sloc) 2.19 KB
#!/bin/bash
# Sync ~/doc to digital dogtag
if [ -d "/media/kevin/dogtag/doc/" ]; then
echo "Syncing ~/doc to dogtag"
rsync -vrulH --progress --delete --size-only ~/doc/ /media/kevin/dogtag/doc/
fi
# Sync ~/doc to hotstore
for HOT in 1
do
if [ -d "/media/kevin/hotstore$HOT/doc/" ]; then
echo "Syncing ~/doc to hotstore$HOT"
rsync -vrulH --progress --delete --size-only ~/doc/ /media/kevin/hotstore$HOT/doc/
fi
done
# Sync ~/doc to VPS
echo "Syncing ~/doc to VPS"
rsync -vrulHz --progress --delete ~/doc/ kevinisageek.org:doc/
# Sync ~/doc to runabout
echo "Syncing ~/doc to VPS"
rsync -vrulHz --progress --delete ~/doc/ runabout.local:doc/
# Sync ~/mail to runabout
echo "Syncing ~/doc to VPS"
rsync -vrulHz --progress --delete ~/mail/ runabout.local:mail/
# Sync ~/books to hotstore
for HOT in 1
do
if [ -d "/media/kevin/hotstore$HOT/librarian/media/books/" ]; then
echo "Syncing ~/books to hotstore$HOT"
rsync -vrulH --progress --delete --size-only ~/books/ /media/kevin/hotstore$HOT/librarian/media/books/
fi
done
# Sync ~/mail to digital dogtag
if [ -d "/media/kevin/dogtag/mail/" ]; then
echo "Syncing ~/mail to dogtag"
rsync -vrulH --progress --delete --size-only ~/mail/ /media/kevin/dogtag/mail/
fi
# Sync ~/mail to hotstore
for HOT in 1
do
if [ -d "/media/kevin/hotstore$HOT/mail" ]; then
echo "Syncing ~/mail to hotstore$HOT"
rsync -vrulH --progress --delete --size-only ~/mail/ /media/kevin/hotstore$HOT/mail/
fi
done
# Sync hotstore to coldstores
for HOT in 1
do
if [ -d "/media/kevin/hotstore$HOT/" ]; then
for COLD in 1 2
do
if [ -d "/media/kevin/coldstore$COLD/" ]; then
echo "Syncing hotstore$HOT to coldstore$COLD"
rsync -vrulH --progress --delete --size-only --exclude "lost+found" /media/kevin/hotstore$HOT/ /media/kevin/coldstore$COLD/
fi
done
fi
done
# Sync hotstore to offsites
for HOT in 1
do
if [ -d "/media/kevin/hotstore$HOT/" ]; then
for OFF in 1 2
do
if [ -d "/media/kevin/offsite$OFF/" ]; then
echo "Syncing hotstore$HOT to offsite$OFF"
rsync -vrulH --progress --delete --size-only --exclude "lost+found" /media/kevin/hotstore$HOT/ /media/kevin/offsite$OFF/
fi
done
fi
done
You can’t perform that action at this time.