duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Restart duplicity without private key


From: Radomír Černoch
Subject: Re: [Duplicity-talk] Restart duplicity without private key
Date: Thu, 19 Jun 2014 15:36:19 +0200

Now I see. I will probably go for the "two public keys" option you proposed.

Thanks for the clarification and your time,
Radek

On 19 June 2014 15:19,  <address@hidden> wrote:
> On 19.06.2014 15:10, Radomir Cernoch wrote:
>> Thu, 19 Jun 2014 13:36:20 +0200 address@hidden:
>>>>> as a workaround you can delete the unfinished backup's files
>>>>> manually on your backend. the files are neatly named with date.
>>>>> run a verify afterwards to be sure.
>>>>
>>>> Huh. I feel extremely anxious about executing "rm [whatever]" in the
>>>> backup directory using my own (therefore badly tested) code.
>>>> Or is there a 100% safe pattern to remove an incomplete backup only?
>>>
>>> it is 100% safe if you look out what you do ;).. if in doubt move the
>>> files out of the way instead of deleting them right away.
>>>
>>> have a look at your backup repository. file names and creation times
>>> will speak for themselves.
>>
>> I never thought that duplicity's main documentation is the file
>> creation time. :)
>>
>> But seriously speaking, how do I recognize an interrupted backup?
>> And which files should I delete/remove?
>>
>> My first script checks a) file's ctime and b) retains the file only
>> if the timestamp in the filename has a corresponding manifest-file.
>> From my (admittedly shallow) understanding, I would do something like
>>
>> #!/bin/bash
>> manifests() {
>>   stat -c '%Y %n' *manifest* |\
>>     sed 's/\.manifest.*//' |\
>>     sed 's/ .*\./ /'
>> }
>>
>> if [ `manifests | wc -l` -eq 0 ]; then
>>   mkdir -p trash/ && mv * trash/
>> else
>>   LAST_TIME=`manifests | sort -n | tail -1 | cut -d ' ' -f 2-`
>>   TO_DELETE=`find ./ -newer "$LAST_TIME"`
>>   for PATTERN in `manifests | cut -d ' ' -f 2`; do
>>     TO_DELETE=`echo "$TO_DELETE" | grep -v .to.$PATTERN`;
>>     TO_DELETE=`echo "$TO_DELETE" | grep -v -full.$PATTERN`;
>>     TO_DELETE=`echo "$TO_DELETE" | grep -v -full-signatures.$PATTERN`;
>>   done
>>   mkdir -p trash/ && mv $TO_DELETE trash/
>> fi
>>
>>
>> Honestly, I don't feel like putting this on production server.
>> Is this a good idea at all? Or is there an easier way?
>>
>
> no it is not.. this was meant as a workaround. not an automatism. generally 
> speaking if restarting fails and you don't care you simply delete all files 
> belonging to the last backup in the repository. _manually_
>
> everything else
> - detection of incomplete backups for cleanup
> - an option to tell duplicity never to restart
> belongs in duplicity. it simply has to be hacked by someone ;)
>
> also. if you keep machine private keys the whole deletion of incomplete 
> backups becomes academic anyway.
>
> ..ede/duply.net
>
>
>
>
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]