Bug #19743
closedDirectories created by katello-backup with the timestamp are complicating incremental backup process.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1455281
Description of problem:
Till Satellite v 6.2.7 the incremental backup procedure was working via cron jobs. Since we have introduced the directory structure with the timestamp it is complicated for the administrators to create the incremental backups.
The customers have procedure to create full backup on every Sunday and during week days create incremental backups.
When we create the backup jobs using below steps:
1. /bin/katello-backup /sat_backup/Sunday_full_backup/
2. /bin/katello-backup /sat_backup/Monday_incr_backup --incremental /sat_backup/Sunday_full_backup
the backup script create a additional directory with timestamp inside the destination path provided. Like:
- ll /backup/* /incr-backup/*
/backup/katello-backup-2017-05-24T16:01:56+05:30:
total 317464rw-r--r-1 root root 621181 May 24 16:02 config_files.tar.gzrw-r--r-1 root root 270 May 24 16:03 metadatarw-r--r-1 root root 167782400 May 24 16:02 mongo_data.tar.gzrw-r--r-1 root root 156672000 May 24 16:02 pgsql_data.tar.gz
/incr-backup/katello-backup-2017-05-24T16:05:15+05:30:
total 317476rw-r--r- 1 root root 620123 May 24 16:05 config_files.tar.gzrw-r--r- 1 root root 270 May 24 16:07 metadatarw-r--r- 1 root root 167782400 May 24 16:05 mongo_data.tar.gzrw-r--r- 1 root root 156682240 May 24 16:05 pgsql_data.tar.gz
#
because of this instead of incremental backup every time it create fresh full backup. Here is the size of backups.
- du -sh /backup/* /incr-backup/*
311M /backup/katello-backup-2017-05-24T16:01:56+05:30
311M /incr-backup/katello-backup-2017-05-24T16:05:15+05:30
If we run the incremental back with below command then it works properly:
- katello-backup /incremental-backup/ --skip-pulp-content --incremental /backup/katello-backup-2017-05-24T16\:01\:56+05\:30/
- du -sh /backup/* /incremental-backup/*
311M /backup/katello-backup-2017-05-24T16:01:56+05:30
9.8M /incremental-backup/katello-backup-2017-05-24T17:04:36+05:30
But the backup tasks can not executed manually on daily basis, the administrators have to set a cron job for the same because of the directories with timestamp it is not easy to do it via cron job.
Version-Release number of selected component (if applicable):
Satellite v 6.2.9
How reproducible:
Always
Steps to Reproduce:
1. Create a cron job to take incremental backup with below commands:
/bin/katello-backup /sat_backup/Sunday_full_backup/
/bin/katello-backup /sat_backup/Monday_incr_backup --incremental /sat_backup/Sunday_full_backup
Actual results:
Because of the directory created with timestamp in the destination directory, the incremental backup is not working as expected.
Expected results:
The katello-backup script should provide an easy option to take incremental backups automatically.
Additional info: