Purging of old backup - Simple cut-off is not happening
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sbackup (Ubuntu) |
New
|
Undecided
|
Oumar Aziz OUATTARA |
Bug Description
Hi there,
our Simple Backup Suite is not simply purging old backups. That how simple the description of the issue we're having with SBackup could be.
I spent a few hours researching on the internet if it is known issue, and only indication could be that the backup destination is not native linux FS (it's NTFS in fact), and only a couple of previously reported issues: 126278, 71698 - both issues have been already closed.
DETAILED DESCRIPTION
+++++++
We have "Ubuntu Trusty 14.04.5 LTS" as a build server for our Android projects.
(This version is mandated by AOSP requirements (https:/
We have SBackup Suite for Admins configured in place and scheduled to perform:
a full backup at least once every 7 days
using GZIP as compression format
Schedule: Custom: 0 22 * * *
With a purging enabled for:
Simple cut-off: Erase all backup older than 10 days.
Destination is a mounted USB drive (NTFS unfortunately): /mnt/backups_
/dev/sda1 on /mnt/backups_
Device Boot Start End Blocks Id System
/dev/sda1 2048 3907024895 1953511424 7 HPFS/NTFS/exFAT
Yesterday's full backup failed (again) due to insufficient space on the disk.
2018-05-09 22:14:04,142 - INFO: Summary of backup
2018-05-09 22:14:04,142 - INFO: Number of directories: 106424.
2018-05-09 22:14:04,143 - INFO: Total number of files: 8231456.
2018-05-09 22:14:04,143 - INFO: Number of symlinks: 7094.
2018-05-09 22:14:04,143 - INFO: Number of files included in snapshot: 8231456.
2018-05-09 22:14:04,144 - INFO: Number of new files (also included): 0.
2018-05-09 22:14:04,144 - INFO: Number of files skipped in incremental snapshot: 0.
2018-05-09 22:14:04,145 - INFO: Number of items forced to be excluded: 6.
2018-05-09 22:14:04,145 - INFO: Number of items to be excluded by config: 0.
2018-05-09 22:14:04,145 - INFO: Maximum free size required is '310748 MiB 735 KiB 593'.
2018-05-09 22:14:04,146 - INFO: Available disk size is '82248 MiB 268 KiB'.
2018-05-09 22:14:04,146 - ERROR: An error occurred during the backup: Not enough free space in the target directory for the planned backup (free: 82248 MiB 268 KiB, required: 310748 MiB 735 KiB 593).
The reason why there was no space left on the disk is that purging of old backups doesn't work as the list of old backup reached 15:
xxxxx@mcs-Ubuntu:~$ ll /mnt/backups_
total 1560
drwxrwxrwx 1 root root 1536000 May 9 22:00 ./
drwxrwxrwx 1 root root 4096 Apr 22 21:21 ../
drwx------ 1 root root 4096 Apr 26 03:22 2018-04-
drwx------ 1 root root 4096 Apr 26 23:32 2018-04-
drwx------ 1 root root 4096 Apr 27 23:25 2018-04-
drwx------ 1 root root 4096 Apr 28 23:25 2018-04-
drwx------ 1 root root 4096 Apr 29 23:28 2018-04-
drwx------ 1 root root 4096 Apr 30 23:30 2018-04-
drwx------ 1 root root 4096 May 1 23:39 2018-05-
drwx------ 1 root root 4096 May 3 03:43 2018-05-
drwx------ 1 root root 4096 May 3 23:48 2018-05-
drwx------ 1 root root 4096 May 4 23:26 2018-05-
drwx------ 1 root root 4096 May 5 23:25 2018-05-
drwx------ 1 root root 4096 May 6 23:26 2018-05-
drwx------ 1 root root 4096 May 7 23:27 2018-05-
drwx------ 1 root root 4096 May 8 23:29 2018-05-
drwx------ 1 root root 0 May 9 22:14 2018-05-
xxxxl@mcs-Ubuntu:~$ ls -Al /mnt/backups_
16 137 1254
Not sure what we are doing wrong, but either there must by some fuzzy conditional logic between the days of full backup and the number of old backup to keep, unfortunately this is not explained anywhere.
Or, as someone mentioned in a forum, that backing up to non linux FS could cause problems, then this is definitely the one, but again - I couldn't find it anywhere documented.
ACTUAL BEHAVIOUR
++++++++++++++++
None of the 15 existing backups has been deleted.
Not sure if an attempt was made (where to look for what kind of log?).
EXPECTED BEHAVIOUR
++++++++++++++++++
- For our configuration, expectation is that in the backup folder there will be left 10 old backups left (and 5 oldest be deleted), prior a backup is executed (or after, but it needs to be clear when from the documentation)
- after a new backup is created, there will be only 11 backups in the backup location maximum.
- Documentations better explains how Purging works and all the conditions which needs to be met for it to work (e.g. relationship between full, incremental backup and the number of days you'd like to keep your backup or min age of the backup snapshots (full or inc) to delete.
- The SBackup Suite can have the debug logging turned on (and documented) - dunno how to achieve that, so it can be troubleshoot why it didn't delete old backups.
- Simply, Simple Backup Suite does remove older backup then X amount of days specified in the Purging tab (or its config file)
ADDITIONAL REQUIRED INFO:
+++++++
xxxx@mcs-Ubuntu:~$ lsb_release -rd
Description: Ubuntu 14.04.5 LTS
Release: 14.04
xxxxx@mcs-Ubuntu:~$ apt-cache policy sbackup
sbackup:
Installed: 0.11.6-0ubuntu1
Candidate: 0.11.6-0ubuntu1
Version table:
*** 0.11.6-0ubuntu1 0
500 http://
100 /var/lib/
At the end of a sbackup.log there is a record that "Simple purge" has been attempted (without any status what it actually did):
2018-05-13 16:45:25,339 - INFO: Leading '/' from member names were removed. 09_22.00. 07.699726. mcs-Ubuntu. corrupt` found. Skipped. 09_22.00. 07.699726. mcs-Ubuntu. corrupt` found. Skipped.
2018-05-13 16:45:25,350 - INFO: TAR returned a message: Total bytes written: 370298880 (354MiB, 768KiB/s)
2018-05-13 16:45:25,351 - INFO: TAR has been finished successfully.
2018-05-13 16:45:30,078 - INFO: Corrupt snapshot `2018-05-
2018-05-13 16:45:30,082 - INFO: Simple purge - remove freestanding snapshots older than 10 days.
2018-05-13 16:45:30,177 - INFO: Corrupt snapshot `2018-05-
2018-05-13 16:45:30,181 - INFO: Backup process finished.
2018-05-13 16:45:30,186 - INFO: Terminating GIO File Access Manager.
2018-05-13 16:45:30,186 - INFO: Processing of profile successfully finished (no errors)
I was also wondering what is the definition of the "freestanding" snapshot...