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

Incorrect rsync backup retention #5776

Closed
filippocarletti opened this issue Jun 11, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@filippocarletti
Copy link
Member

commented Jun 11, 2019

Backup retention for the rsync engine is not working as expected.
The manual says:

If the backup destination directory is full, the oldest backups are automatically deleted to free space.

In more details, rsync_tmbackup says:

Set the expiration strategy. 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.

But I found some snapshots missing even in the first 30 days and the latest snapshot was only 30 days old instead of 4 months.

Steps to reproduce

  • Setup an rsync backup, wait some days.

Expected behavior

Strategy respected.

Actual behavior

The backup list has "holes" (missing days).

@filippocarletti

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

This is the list of snapshots:

lrwxrwxrwx 1 root root   17 May  9 11:33 latest -> 2019-05-09-105054
drwxr-xr-x 5 root root 4096 May  9 10:50 2019-05-09-105054
-rw-r--r-- 1 root root    0 May  9 10:50 backup.marker
drwxr-xr-x 5 root root 4096 May  8 07:16 2019-05-08-070222
drwxr-xr-x 5 root root 4096 May  7 07:20 2019-05-07-070204
drwxr-xr-x 5 root root 4096 May  6 07:29 2019-05-06-070147
drwxr-xr-x 5 root root 4096 May  5 07:00 2019-05-05-070005
drwxr-xr-x 5 root root 4096 May  3 07:01 2019-05-03-070158
drwxr-xr-x 5 root root 4096 May  2 07:14 2019-05-02-070153
drwxr-xr-x 5 root root 4096 May  1 07:23 2019-05-01-070151
drwxr-xr-x 5 root root 4096 Apr 29 07:28 2019-04-29-070203
drwxr-xr-x 5 root root 4096 Apr 28 07:12 2019-04-28-070005
drwxr-xr-x 5 root root 4096 Apr 26 07:01 2019-04-26-070150
drwxr-xr-x 5 root root 4096 Apr 24 07:16 2019-04-24-070159
drwxr-xr-x 5 root root 4096 Apr 22 07:43 2019-04-22-070150
drwxr-xr-x 5 root root 4096 Apr 21 07:15 2019-04-21-070005
drwxr-xr-x 5 root root 4096 Apr 19 07:34 2019-04-19-070203
drwxr-xr-x 5 root root 4096 Apr 18 07:10 2019-04-18-070054
drwxr-xr-x 5 root root 4096 Apr 16 12:03 2019-04-16-111649
drwxr-xr-x 5 root root 4096 Apr 15 07:53 2019-04-15-070201
drwxr-xr-x 5 root root 4096 Apr 14 07:00 2019-04-14-070006
drwxr-xr-x 5 root root 4096 Apr 12 07:29 2019-04-12-070211
drwxr-xr-x 5 root root 4096 Apr 10 07:09 2019-04-10-070155

@filippocarletti

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

After reading laurent22/rsync-time-backup#121 I started to use kapitainsky script on May 9.
Here's the list of snapshots as of today:

lrwxrwxrwx 1 root root   17 Jun 11 09:06 latest -> 2019-06-11-070055
drwxr-xr-x 5 root root 4096 Jun 11 07:57 2019-06-11-070055
-rw-r--r-- 1 root root    0 Jun 11 07:00 backup.marker
drwxr-xr-x 5 root root 4096 Jun 10 07:01 2019-06-10-070059
drwxr-xr-x 5 root root 4096 Jun  9 07:22 2019-06-09-070006
drwxr-xr-x 5 root root 4096 Jun  8 07:16 2019-06-08-070100
drwxr-xr-x 5 root root 4096 Jun  7 07:18 2019-06-07-070101
drwxr-xr-x 5 root root 4096 Jun  6 07:13 2019-06-06-070055
drwxr-xr-x 5 root root 4096 Jun  5 07:00 2019-06-05-070058
drwxr-xr-x 5 root root 4096 Jun  4 07:14 2019-06-04-070102
drwxr-xr-x 5 root root 4096 Jun  3 07:00 2019-06-03-070054
drwxr-xr-x 5 root root 4096 Jun  2 07:16 2019-06-02-070005
drwxr-xr-x 5 root root 4096 Jun  1 07:09 2019-06-01-070100
drwxr-xr-x 5 root root 4096 May 31 07:01 2019-05-31-070103
drwxr-xr-x 5 root root 4096 May 30 07:10 2019-05-30-070059
drwxr-xr-x 5 root root 4096 May 29 07:00 2019-05-29-070053
drwxr-xr-x 5 root root 4096 May 28 07:11 2019-05-28-070058
drwxr-xr-x 5 root root 4096 May 27 07:01 2019-05-27-070106
drwxr-xr-x 5 root root 4096 May 26 07:00 2019-05-26-070005
drwxr-xr-x 5 root root 4096 May 25 07:17 2019-05-25-070111
drwxr-xr-x 5 root root 4096 May 24 07:01 2019-05-24-070100
drwxr-xr-x 5 root root 4096 May 23 07:16 2019-05-23-070059
drwxr-xr-x 5 root root 4096 May 22 07:00 2019-05-22-070055
drwxr-xr-x 5 root root 4096 May 21 07:18 2019-05-21-070056
drwxr-xr-x 5 root root 4096 May 20 07:19 2019-05-20-070057
drwxr-xr-x 5 root root 4096 May 19 07:00 2019-05-19-070007
drwxr-xr-x 5 root root 4096 May 18 07:01 2019-05-18-070101
drwxr-xr-x 5 root root 4096 May 17 07:43 2019-05-17-070058
drwxr-xr-x 5 root root 4096 May 16 07:17 2019-05-16-070058
drwxr-xr-x 5 root root 4096 May 15 07:01 2019-05-15-070102
drwxr-xr-x 5 root root 4096 May 14 07:17 2019-05-14-070106
drwxr-xr-x 5 root root 4096 May 13 07:15 2019-05-13-070053
drwxr-xr-x 5 root root 4096 May 10 11:03 2019-05-10-110339
drwxr-xr-x 5 root root 4096 May  3 07:01 2019-05-03-070158
drwxr-xr-x 5 root root 4096 Apr 26 07:01 2019-04-26-070150
drwxr-xr-x 5 root root 4096 Apr 18 07:10 2019-04-18-070054
drwxr-xr-x 5 root root 4096 Apr 10 07:09 2019-04-10-070155

@gsanchietti

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

Test case
Check the bug is not reproducible.

@gsanchietti gsanchietti added the testing label Jun 14, 2019

@filippocarletti filippocarletti added verified and removed testing labels Jun 14, 2019

@nethbot

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

in 7.6.1810/updates:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.