Em Tue, Apr 24, 2012 at 03:13:23PM +0200, Paul van Tilburg escreveu:
> On Mon, Apr 09, 2012 at 02:01:45PM +0200, Paul van Tilburg wrote:
> > I can confirm that after applying the patch, backups seem to be running
> > again (first run with patch was Apr 7 00:36):
> > 
> >   # ls -l
> >   total 40
> >   drwxr-xr-x 19 root root 4096 Apr  9 01:12 daily.1/
> >   drwxr-xr-x 19 root root 4096 Apr  8 01:10 daily.2/
> >   drwxr-xr-x 19 root root 4096 Apr  7 01:14 daily.3/
> >   drwxr-xr-x 19 root root 4096 Apr  7 00:36 daily.4/
> >   drwxr-xr-x 19 root root 4096 Feb 27 01:11 daily.5/
> >   drwx------ 11 root root 4096 Apr  9 01:12 metadata/
> 
> And...  I have found another problem.  Sorry!  The daily backups seem to
> run fine, but two weeks later, I still have no weekly backups:

Hi Paul, don't need to apologize. I would say exactly the opposite:
sorry for you doing the work I'm not doing well recently which is a proper
debug of backupninja rotation functions.

>   # ls -l
>   total 52
>   drwxr-xr-x 19 root root 4096 Apr 24 01:01 daily.1/
>   drwxr-xr-x 19 root root 4096 Apr 23 01:01 daily.2/
>   drwxr-xr-x 19 root root 4096 Apr 22 01:01 daily.3/
>   drwxr-xr-x 19 root root 4096 Apr 21 01:01 daily.4/
>   drwxr-xr-x 19 root root 4096 Apr 20 01:01 daily.5/
>   drwxr-xr-x 19 root root 4096 Apr 19 01:01 daily.6/
>   drwxr-xr-x 19 root root 4096 Apr 18 01:01 daily.7/
>   drwx------ 14 root root 4096 Apr 24 01:01 metadata/
>   drwxr-xr-x 19 root root 4096 Feb 27 01:11 weekly.1/
>   drwxr-xr-x 19 root root 4096 Jan 13 01:07 weekly.2/
>   drwxr-xr-x 18 root root 4096 Jan  4 01:04 weekly.3/
> 
> When running backupninja in debug mode, it says that it thinks that each
> weekly.* is not old enough as it doesn't match the 7d/14d/21d/etc. old
> requirement.  I think the metadata is fixed now for the daily stuff, but
> not the weekly stuff, concerning what I found:
> 
>   # cat metadata/weekly.1/rotated
>   Thu 12 Apr 2012 01:04:38 CEST
>   1334185478
>  
> Obviously, weekly.1 is not rotated April 12, but February 27, the same
> holds for weekly.2 and weekly.3, but then with April 7.

If I understood correctly given the info above, weekly.1/ folder dates from
"Feb 27 01:11" but metadata/weekly.1/rotated says it was rotated at "Thu 12 Apr
2012 01:04:38 CEST".

What really counts is the date from the metadata file as the folder dates
varies if it was created (new increment, mkdir) or moved from an older
increment (weekly.1, is the former oldest daily backup).

This makes me feel that we should change the folder dates to something closer
to the actual rotation dates (a simple "touch" would suffice) otherwise it can
get confusing to have one date in the folder and other in the increment.

For that, I'm opening upstream issue https://labs.riseup.net/code/issues/3929

I wouldn't exclude other problems with the weekly/monthly rotations and I could
not spot why your weekly.* folders are so old comparing to the daily ones
(maybe you disabled your rsync action for a while?) but the rotations seems to
be happening.

I still need to provide an unified patch for you to test. I'm very busy with
lots of stuff but I'll try to do it soon.

-- 
rhatto at riseup.net
pubkey 64E39FCA / keys.indymedia.org

Attachment: signature.asc
Description: Digital signature

Reply via email to