Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarsnap-prune.sh debug options #2

Open
pronoiac opened this issue Sep 14, 2014 · 1 comment
Open

tarsnap-prune.sh debug options #2

pronoiac opened this issue Sep 14, 2014 · 1 comment

Comments

@pronoiac
Copy link
Owner

The original debug option was for developer use, on a different system. For others to use it, it's probably better and clearer to add an argument for a dry-run, which regenerates the archive list. Or perhaps, add an option if you don't want to regenerate the archive list.

@tjharman
Copy link

If you set DEBUG=true then tarsnap-prune.sh doesn't run correctly anyway, because of this:

then
    TMPFILE=/tmp/tarsnap.archives
    if [ ! -f $TMPFILE ]; then
        $TARSNAP --configfile /etc/tarsnap.conf --list-archives > $TMPFILE
    fi
else
    TMPFILE=/tmp/tarsnap.archives.$$
    $TARSNAP --configfile /etc/tarsnap.conf --list-archives > $TMPFILE
fi

The problem is, if DEBUG=true in tarsnap-cron.conf then this is run:

if [ "$DEBUG" = "true" ]
then
    TARSNAP="echo tarsnap"
fi

Thus /tmp/tarsnap.archives ends up with "echo tarsnap --configfile /etc/tarsnap.conf --list-archives" in it.

Given this issue is ~5 years old I don't expect any fixes, this is just here for the next person that wonders what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants