Skip to content
Snippets Groups Projects
Verified Commit 9fda3e62 authored by David Beniamine's avatar David Beniamine
Browse files

Remove old increments on fail

parent 380e5d34
No related branches found
No related tags found
No related merge requests found
...@@ -15,8 +15,18 @@ exit_on_fail(){ ...@@ -15,8 +15,18 @@ exit_on_fail(){
retrie_on_fail(){ retrie_on_fail(){
if [ $1 -ne 0 ]; then if [ $1 -ne 0 ]; then
backup "cleaned" keep=$(($BK_KEEP_FULL-1))
if [ $keep -gt 0 ]; then
run_duplicity remove-all-inc-of-but-n-full $(($BK_KEEP_FULL-1)) --force run_duplicity remove-all-inc-of-but-n-full $(($BK_KEEP_FULL-1)) --force
else
cat <<EOF | lftp $host
user $user $ftppass
rm -rf $remotedir/*-inc*
rm -rf $remotedir/*-new-signatures*
EOF
fi
backup "cleaned"
leave $? leave $?
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment