11/8/2023 0 Comments Automated folder backup linux![]() ![]() Edit it using crontab -e and add this line to the end: 0 15 * * * bash /path/to/script/backup. You could also use cron to run the script regularly. Even if you login more than one time in a day, you only get 1 backup. Then add the command Scripts/./backup.sh to the start at login applications. ![]() Run the following commands: chmod +x Scripts/backup.sh Save the script in /home//Scripts as backup.sh The safe.png file that it used for the notifications can be downloaded from here. ![]() This will save a backup file that looks like this: backup-13:13.tar.gz Tar -cvpzf /home//.Backups/backup-$(date +%Y-%m-%d-%H:%M).tar.gz "/home//folder/to/back/up" -exclude=.Backups & notify-send -expire-time=60000 -i /home/tim/Pictures/Home/Logos/safe.png 'Backup Status' 'Finished backup for today.' Notify-send -i /home//Pictures/Logos/safe.png "Backup Status" "Starting backup for today." # If the dates are different, start the backup. Notify-send -i /home//Pictures/Logos/safe.png "Backup Status" "Already started/finished backup for today." I tried rsync, but it doesn't seem to be able to do what I want, or more likely, I don't know how to make it do that. # If the cureent date is the same as the date of the most recent backup, don't run the backup, just give a notification that says it has already been done today. Linux backup utility for incremental backups Ask Question Asked 3 years, 6 months ago Modified 2 years, 2 months ago Viewed 23k times 22 I'm looking for a backup utility with incremental backups, but in a more complicated way. type f -printf %p\n' | sort -n | tail -1 | cut -f2-d" ") Date-appended archive file names for easy identification. Well I use the following script for my backup: #! /bin/bash Daily automated backups of a specified folder using the zip utility. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |