pi@pi5-64bit-sd:/ $ sudo nano root/backup.sh<br />
<br />
<br />
<br />
DATE=`date +%y%m%d`<br />
<br />
mysqldump -u root -praspberry --all-databases --skip-lock-tables > /home/pi/backup/alldb.sql<br />
<br />
# PLS list any folder that you need to backup as shown below #<br />
tar cvf /home/pi/backup/html.tar /var/www/html/temp /var/www/html/test<br />
<br />
mv /home/pi/backup/alldb.sql /home/pi/backup/$DATE.sql<br />
mv /home/pi/backup/html.tar /home/pi/backup/$DATE.html.tar<br />
<br />
#DATE=`date +%y%m%d_%a_`<br />
#FNAME="$DATE"<br />
#TARNAME="/home/pi/backup.tar/$FNAME.tar"<br />
#tar cvf $TARNAME /home/pi/backup/*<br />
#find /home/pi/backup.tar -name "*.tar" -type f -mtime +300 -delete<br />
#rsync -a --progress --links --safe-links --delete /home/pi/backup/* rsync://root@192.168.8.90:873/backup/server.pi/<br />
rsync -a --progress --links --safe-links /home/pi/backup/* rsync://root@192.168.8.90:873/backup/server.pi/<br />
<br />
rm -f /home/pi/backup/*