backup of files and directories under LINUX and MACOS

backup of files and directories under LINUX and MACOS

Linux shell script to run at the command line $ sh my_script_backup.linux
Categories

export D=$(date +%y-%m-%d)
echo $D" save_my_work.linux" >> /var/log/SAVE_MY_WORK
export AGO=$(date -d '6 days ago' +%y-%m-%d)

mkdir -p /media/username/SEDUSB/BACKUP/2021

echo -e "backup d une base de données supprimer le dièse du dessous"
# mysqldump -umoncompte -pmonpass nomdemabase > /media/username/SEDUSB/BACKUP/2021/sql_monbackup-$D.sql

echo -e "backup du répertoire concerne"
 tar cpzf /media/username/SEDUSB/BACKUP/2021/file_monbackup-$D.tar.gz /home/username/Documents/1__PROJET_DEV

echo  -e "efface le bakup j-7"
# rm /media/username/SEDUSB/BACKUP/2021/sql_monbackup-$AGO.sql
# rm /media/username/SEDUSB/BACKUP/2021/file_monbackup-$AGO.tar.gz

Related posts

new town hall management application TOWNHALL version 2020

new town hall management application TOWNHALL version 2020

manages the town hall from A to Z