[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tarsnap, cron, shell



Colin Brace wrote:
> On my FreeBSD server, I have created a file under
> /usr/local/etc/periodic/daily to run tarsnap, with some commands like this:
> 
> tarsnap --humanize-numbers -c -f etc-$(date "+%Y%m%d-%H%Mh") /etc
> /usr/local/etc
> 
> When I run this command in root, it executes as expected. However, when
> cron runs it, I get an error message in the daily log:
> 
> tarsnap: Sequence number mismatch: Run --fsck
> tarsnap: Error creating new archive
> 
> I thought this might be a bash issue, as I was running this cron job
> with /bin/sh, but the same error occurs with /usr/local/bin/bash.

That error means that the cache directory Tarsnap is using it out of sync
with what's on the server.  This almost certainly means that Tarsnap is
trying to use the wrong cache directory.

How this is happening exactly, I'm not sure; but do any/all of the
following files exist
> /usr/local/etc/tarsnap.conf
> /root/.tarsnaprc
> /home/*/.tarsnaprc
and do they contain 'cachedir /path/to/somewhere' directives?

-- 
Colin Percival
Security Officer, FreeBSD | freebsd.org | The power to serve
Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid