I3 to Sway #1
1 changed files with 76 additions and 67 deletions
79
bin/rsync.sh
79
bin/rsync.sh
|
@ -3,39 +3,39 @@
|
|||
TYPE='' # usb / sshfs
|
||||
CMD=rsync
|
||||
ARGS='-avz --delete
|
||||
--exclude /Nextcloud
|
||||
--exclude /.cache
|
||||
--exclude /Downloads
|
||||
--exclude /.thunderbird
|
||||
--exclude /Projects
|
||||
--exclude /Software
|
||||
--exclude /tmp
|
||||
--exclude /fonts
|
||||
--exclude /Music
|
||||
--exclude /node_modules
|
||||
--exclude /snap
|
||||
--exclude /.local/share/Trash
|
||||
--exclude /.npm
|
||||
--exclude /.thumbnails
|
||||
--exclude /Android
|
||||
--exclude /.AndroidStudio*
|
||||
--exclude /.android
|
||||
--exclude /.bundle/cache
|
||||
--exclude /.config/cache
|
||||
--exclude /.config/Code/Cache
|
||||
--exclude /.config/Code/CachedData
|
||||
--exclude /.config/Slack
|
||||
--exclude /.config/*/Cache
|
||||
--exclude /.config/chromium
|
||||
--exclude /.mozilla
|
||||
--exclude /.config/discord
|
||||
--exclude /.config/spotify
|
||||
--exclude /.crashlytics
|
||||
--exclude /.fastlane
|
||||
--exclude /.gradle
|
||||
--exclude ./Software
|
||||
--exclude /.local
|
||||
--exclude /.DataGrip*'
|
||||
--exclude /Nextcloud
|
||||
--exclude /.cache
|
||||
--exclude /Downloads
|
||||
--exclude /.thunderbird
|
||||
--exclude /Projects
|
||||
--exclude /Software
|
||||
--exclude /tmp
|
||||
--exclude /fonts
|
||||
--exclude /Music
|
||||
--exclude /node_modules
|
||||
--exclude /snap
|
||||
--exclude /.local/share/Trash
|
||||
--exclude /.npm
|
||||
--exclude /.thumbnails
|
||||
--exclude /Android
|
||||
--exclude /.AndroidStudio*
|
||||
--exclude /.android
|
||||
--exclude /.bundle/cache
|
||||
--exclude /.config/cache
|
||||
--exclude /.config/Code/Cache
|
||||
--exclude /.config/Code/CachedData
|
||||
--exclude /.config/Slack
|
||||
--exclude /.config/*/Cache
|
||||
--exclude /.config/chromium
|
||||
--exclude /.mozilla
|
||||
--exclude /.config/discord
|
||||
--exclude /.config/spotify
|
||||
--exclude /.crashlytics
|
||||
--exclude /.fastlane
|
||||
--exclude /.gradle
|
||||
--exclude ./Software
|
||||
--exclude /.local
|
||||
--exclude /.DataGrip*'
|
||||
ORIG='/home/dbroqua/'
|
||||
DEST=''
|
||||
HOSTNAME=`hostname`
|
||||
|
@ -48,7 +48,6 @@ DEST_USB="/mnt/backup/${HOSTNAME}/dbroqua/"
|
|||
# SSHFS
|
||||
DEST_SSHFS="storage:Backup/${HOSTNAME}/dbroqua/"
|
||||
|
||||
echo `date` > ${ORIG}/lastBackup
|
||||
|
||||
while getopts t:h opt
|
||||
do
|
||||
|
@ -71,7 +70,6 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
|
||||
|
||||
if [ "${TYPE}" != '' ] ; then
|
||||
case ${TYPE} in
|
||||
|
@ -91,3 +89,14 @@ if [ "${TYPE}" != '' ] ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
echo $?
|
||||
|
||||
if [ $? == 0 ] ; then
|
||||
echo `date` > ${ORIG}/lastBackup
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastBackup
|
||||
rm ${ORIG}/lastFailBackup
|
||||
else
|
||||
echo `date` > ${ORIG}/lastFailBackup
|
||||
echo "Method: ${TYPE}" >> ${ORIG}/lastFailBackup
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue