SMDBA Tool does not clean up the backup archives
Hello everybody, Since our initial installation of Uyuni, we have been making database backups with the smdba tool. We set up the backup exactly according to the information in the documentation. After the first manual backup, the automatic backups were activated via cron and work perfectly. Today we received a warning about insufficient storage space and found that the old archives in the DB backup directory / var / spacewalk / db-backup are obviously not to be deleted. All daily archives are available back to 09/20/2020. Where do I start looking for the cause? Many thanks for the support! best regards Thomas
Hi Thomas, what would have you expected? Do you expect some kind of clean up maybe? thanks for your feedback jordi On 5/14/21 9:06 AM, Thomas Weis wrote:
Hello everybody,
Since our initial installation of Uyuni, we have been making database backups with the smdba tool. We set up the backup exactly according to the information in the documentation. After the first manual backup, the automatic backups were activated via cron and work perfectly. Today we received a warning about insufficient storage space and found that the old archives in the DB backup directory / var / spacewalk / db-backup are obviously not to be deleted. All daily archives are available back to 09/20/2020. Where do I start looking for the cause? Many thanks for the support!
best regards Thomas
-- Jordi Massaguer Pla Linux Engineer SUSE Linux https://www.suse.com
Hi Jordi, Thank you for your answer. Yes, I expected that the smba tool would only archive a certain time frame. According to the documentation: "The smdba tool also manages your archives, keeping only the most recent backup, and the current archive of logs." Have I misinterpreted that and do I delete the superfluous archives manually or by script or does the smdba tool not do what it should do here? Thanks again Regards Thomas
Am 14.05.2021 um 16:49 schrieb Jordi Massaguer Pla
: Hi Thomas,
what would have you expected? Do you expect some kind of clean up maybe?
thanks for your feedback
jordi
On 5/14/21 9:06 AM, Thomas Weis wrote:
Hello everybody,
Since our initial installation of Uyuni, we have been making database backups with the smdba tool. We set up the backup exactly according to the information in the documentation. After the first manual backup, the automatic backups were activated via cron and work perfectly. Today we received a warning about insufficient storage space and found that the old archives in the DB backup directory / var / spacewalk / db-backup are obviously not to be deleted. All daily archives are available back to 09/20/2020. Where do I start looking for the cause? Many thanks for the support!
best regards Thomas
-- Jordi Massaguer Pla Linux Engineer SUSE Linux https://www.suse.com
On 14/05/2021 18.56, Thomas Weis wrote:
Yes, I expected that the smba tool would only archive a certain time frame. According to the documentation: "The smdba tool also manages your archives, keeping only the most recent backup, and the current archive of logs." Have I misinterpreted that and do I delete the superfluous archives manually or by script or does the smdba tool not do what it should do here?
My understanding is that `smdba backup-hot --enable=on` should run pg_archivecleanup under the hood, and the latter is supposed to clean up any stale WAL files, so that your backup only contains data in order to restore the database as of the time when it is running. If that is not the case, it could be due to a bug. Regards, -- Silvio Moioli SUSE Manager Development Team
Hi Am Montag, 17. Mai 2021, 09:29:03 CEST schrieb Silvio Moioli:
On 14/05/2021 18.56, Thomas Weis wrote:
Yes, I expected that the smba tool would only archive a certain time frame. According to the documentation: "The smdba tool also manages your archives, keeping only the most recent backup, and the current archive of logs." Have I misinterpreted that and do I delete the superfluous archives manually or by script or does the smdba tool not do what it should do here?
My understanding is that `smdba backup-hot --enable=on` should run pg_archivecleanup under the hood, and the latter is supposed to clean up any stale WAL files, so that your backup only contains data in order to restore the database as of the time when it is running.
If that is not the case, it could be due to a bug.
Please check the database logs in /var/lib/pgsql/data/log/ . Sometimes it happens that the copy of the wal files to the backup dir failed. In this case it will try to copy again and again until the real problem is solved. In such a case the old wal files in the backup are not cleaned up. Typical solution: solve the problem and with the next backup things start to work again. -- Regards Michael Calmer -------------------------------------------------------------------------- Michael Calmer SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, D-90409 Nuernberg T: +49 (0) 911 74053 0 F: +49 (0) 911 74053575 - e-mail: Michael.Calmer@suse.com -------------------------------------------------------------------------- SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer (HRB 36809, AG Nürnberg)
participants (4)
-
Jordi Massaguer Pla
-
Michael Calmer
-
Silvio Moioli
-
Thomas Weis