I have a script that normally runs my snapshot that I haven't
used for the past several days because something seemed
to be going wrong and I wanted to run things manually.

But running the script twice today, I got:
 snaphome
Found 15 mounted dated, snaps or snap archives
ยป[snapper#2120]base_mp=/home
1 snap dated today.
 (Use: '--force=force_create_snap' to force another snap.)
 Checking other snaps for needed attention...
Oldest Snapshot = Home-2014.08.03-02.05.53.
Rsync with 9 excludes from config file...CODE(0x7f6098) at /home/perl/perl-5.16.3/lib/site/Carp.pm line 169. rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(632) [sender=3.1.1] rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at io.c(513) [Receiver=3.1.1]

But when I run the snapper script manually, I don't get such an error...

Odd...

The snaphome script is designed to run the snapper script (which calls rsync)
and send it's log to a file and allow it to be automatically monitored...


#!/bin/bash

: {HOME:-/home/law}
declare -i output_wanted=1
export ld=$HOME/var/log PATH=$HOME/bin:$PATH
export PERL5OPT='-Mutf8 -CSA -I/home/law/bin/lib'

function snaprun () {
 cd "$ld" && {
   if [[ -e snap.log ]]; then
     mv "snap.log" "snap.log-$(ShortDateTime)"
     #7z a snap.log.7z snap.log-[0-9]*.[
   fi
   declare cmd="nice -19 ionice -c3 snapper.pl -X x /home"
   {
     echo "" >"$ld/snap.log"
     $cmd "$@" >& "$ld/snap.log" </dev/null
   } && out=$(mksnap_links 2>&1)
 }
}

(snaprun "$@" </dev/null &)

if ((output_wanted)); then
 tail -f "$ld/snap.log"
fi


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to