Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #mkdir backuup
- pathToDirectory="/home/admin00/Desktop/aaa/"
- #firstsize=$(du -bS *.txt $pathToDirectory)
- rasshirenie=".txt"
- currentDate=$(date +%Y-%m-%d)
- tar -cf backuup/ArchiveForBackup$currentDate.tar $pathToDirectory*$rasshirenie
- tar -xf backuup/ArchiveForBackup$currentDate.tar >> /dev/null; echo $?
- #cat <(crontab -l) <(echo "0 0 * * 0/home/admin00/Desktop/backup.sh") | crontab -
- #(crontab -l 2>&/dev/null; echo "0 0 * * 5/home/admin00/Desktop/backup.sh")|crontab -
- #crontab -l|{cat; echo "0 0 * * 0/home/admin00/Desktop/backup.sh";}|crontab -
- #does backup every friday
- # in terminal: crontab -e, then ****0/home/admin00/Desktop/backup.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement