I heard that it is a good idea to schedule backup in crontab file.
I also head that it is bad to edit files while they are backed up.
It may happen that cron stats to backup a directory while I am still editing some files in the directory. What shall I do to prevent or deal with the above situation?
Can I be notified a few minutes before cron starts to run back up, so that I can stop editing? Can I be notified when backup scheduled by cron finishes, so that I can resume editing?
ed
or the originalvi
), or usedd
to do the backup, there's little to worry about. – Mark Plotnick Apr 21 '15 at 01:56dd
a problem? – Tim Apr 21 '15 at 02:39export DISPLAY=:0 && notify-send "Backup warning" "Backup is about to begin, get ready..." -t 60000; sleep 2m; rsync...
. Info about notify-send here - you might need to install notify-osd package first (if using debian-derived distro). – gogoud Apr 22 '15 at 06:27