mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit fb594b042bc394bae89df3cf2d81d2e3295bc967
parent b2d252e99b972c7bd92e6e7ecbcf2f0c7eeecf17
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 30 Sep 2015 11:43:08 +0200

fix cron noise

Diffstat:
calendar-backup.sh | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/calendar-backup.sh b/calendar-backup.sh @@ -1,5 +1,12 @@ #!/bin/bash +# run with chronic to avoid spam + mkdir -p ~/backup/calendar -cd # required to have the right paths in the archive -tar zcf ~/backup/calendar/dump-`date +%s`.tgz calendar +cd; cd ~/backup/ # required to have the right paths in the archive + +# avoid "file changed as we read it" errors from tar +cp -Rv calendar_current calendar_backup +tar zcf calendar/dump-`date +%s`.tgz calendar_backup +rm -Rvf calendar_backup +