Speed up backup script
This is running slower than I like.
I want it to compress files only with newer files and then go on to the next item.
I will get rid of anything that is slowing it down.
How can I speed it up?
Code:
#!/bin/bash
#
# BACKUP IMPORTANT FILES TO MAXTOR DRIVE
#
# Don't use ALLCAPS for variable names or begin them with a number.
#
DOG_ATTACKS="home/andy/Dog_Attack/"
Backup_Directory="/media/andy/Maxtor/Backup/Ubuntu_Mate_24.04/"
DOCS="/home/andy/Documents/" # shell variable
SCRIPTS="/home/andy/bin/"
HOME="/home/andy/"
ICONS="/home/andy/Icons"
MY_Sounds="/usr/share/sounds/My_Sounds/"
THUNAR="/home/andy/.config/Thunar/"
Music="/home/andy/Music/"
FedEx="/home/andy/FedEx/"
#
cd $THUNAR
tar -cf Thunar_Custom_Actions.tar uca.xml
/usr/bin/rsync --progress -r -u Thunar_Custom_Actions.tar $Backup_Directory
#--------------------------------
cd /home/andy/Dog_Attack/
tar -cf Dog_Attack_Documentation.tar *.png *.pdf *.odt *.jpg *.mp4
/usr/bin/rsync --progress -r -u Dog_Attack_Documentation.tar $Backup_Directory
#-----------------------------------------------
#
cd $DOCS
tar -cf Ubuntu_Documents.tar *.txt *.doc *.rtf *.html *.png *.pdf *.odt *.ods *.odg *.csv *.xls *.jpg *.PDF *.docx *.otg
## ONLY copy file if it's newer than destination file
##
/usr/bin/rsync --progress -r -u Ubuntu_Documents.tar $Backup_Directory
#-----------------------------------------------
cd $SCRIPTS
tar -cvf UM_24_04_Ubuntu_Scripts.tar *.sh *.txt
/usr/bin/rsync --progress -r -u UM_24_04_Ubuntu_Scripts.tar $Backup_Directory
#
# Backup Firefox bookmarks.
#
# Backup my music
/usr/bin/rsync --progress -r -u /home/andy/.mozilla/firefox/t0kduppg.default-release/bookmarks.html $Backup_Directory
#
cd $Music
tar -cvf My_Music.tar *.mp3
/usr/bin/rsync --progress -r -u My_Music.tar $Backup_Directory
#
cd $FedEx
tar -cvf FedEx_Documentation.tar *.png $Backup_Directory
/usr/bin/rsync --progress -r -u FedEx_Documentation.tar $Backup_Directory
#
#date +'%m/%d/%Y %I:%M:%S %p' > /home/andy/Downloads/Computer_Backup.txt
gxmessage -fg blue -font 'sans 20' -timeout 2 'Computer has been backed up'
touch /home/andy/bin/Backup_24_04.sh
touch /home/andy/Documents/blank.odt
/usr/bin/geany /home/andy/Documents/Stuff_To_Paste.txt
Ubuntu Mate 24.01
Mate Desktop