Rsync engine - old backups missing

Hi!

I set NethServer to use rsync for backup engine a few months ago (in february).

Quote from Duplicity replacement –> rsync:

Within the last 31 days, the most recent backup of each day is kept.
After 31 days, only the most recent backup of each month is kept.
Additionally, if the backup destination directory is full, the oldest backups are deleted until enough space is available.

117G free space is available on backup machine (used 13G).
Despite this, i noticed that there are backup folders for last 30 days only:

[backup@backup] ~> date
Fri May 31 08:17:53 CEST 2019

[backup@backup] ~> ls -al /mnt/backup/neths/
total 216
drwxr-xr-x 27 backup wheel 1024 May 30 19:24 .
drwxr-xr-x 6 root wheel 512 May 29 11:53 …
drwxr-xr-x 4 root wheel 512 May 1 19:22 2019-05-01-190013
drwxr-xr-x 4 root wheel 512 May 2 19:22 2019-05-02-190013
drwxr-xr-x 4 root wheel 512 May 3 19:22 2019-05-03-190014

drwxr-xr-x 4 root wheel 512 May 30 19:22 2019-05-30-190014
-rw-r–r-- 1 root wheel 0 May 30 19:22 backup.marker
lrwxrwxrwx 1 root wheel 17 May 30 19:24 latest -> 2019-05-30-190014

According to logs, backup completed without errors.

My question is where are the older backups, should they be there?
Is the backup malfunctioning, or misunderstand something?

Thanks!

I’m investigating the a similar behaviour in my system, I think that the backup script has a bug.
See:

I’m using kapitainsky’s script since a few days and it’s behaving as documented.

Default: “1:1 30:7 365:30” means after one
day, keep one backup per day. After 30 days, keep one backup every 7 days.
After 365 days keep one backup every 30 days.

I’m waiting to reach one month of testing to see if old backups are kept. If true, I’ll release an updated package.
Then we should make our voice heard in the github issue linked above to convince Laurent to merge kapitainsky fork.

If you want to test kapitainsky’s script:

wget https://raw.githubusercontent.com/kapitainsky/rsync-time-backup/bugfix-fn_expire_backups/rsync_tmbackup.sh
chmod a+x rsync_tmbackup.sh
mv rsync_tmbackup.sh /usr/bin
2 Likes

I’ve already downloaded kapitainsky’s script, fingers crossed.

Thanks for the quick response!

1 Like

I’ve filed a new issue, I’d like to distribute the updated script to everybody.

We have to also give feedback to rsync_tmbackup issue tracker to let others benefit from the fix.

1 Like

I’m glad that the fix has started. I began to use the script later, and because of the “holes”, for older backups than 30 days, i don’t see the 7-day intervals yet. But, according to your list, after a while it will be good.

1 Like

The topic is old, but just one more (maybe a dumb) question. If only one backup is left per week, when will a file be in safe, if you do not delete it from the server for a full week?