fixes #19743, #18358 - allows user to bypass subdir creation #460
Conversation
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
Not related to this PR, but it looks like incremental is broken [root@steak ~]# /home/vagrant/katello-packaging/katello/katello-backup --incremental /backup/no_subdir_with_inc/ Assuming I have the right syntax here, it looks like this check is still going to run even though If this is correct, I can file an issue and fix |
The reason I was testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting this message when running with --preserve-directory on an existing backup
gzip: pgsql_data.tar.gz already exists; do you wish to overwrite (y or n)? gzip: mongo_data.tar.gz already exists; do you wish to overwrite (y or n)?
This will be an issue for those who are going to use a cron job to backup to the same directory. I am thinking we should remove all files in the backup with a yes/no confirmation that their backup will be overwritten. (that can be overridden with -y/--yes kind of thing).
@johnpmitsch you'd still need to define the backup directory so it would look something like:
Running --preserve-directory will not create a subdirectory no matter what other options are listed. Using this with --incremental would probably be the most likely scenario. |
@cfouant so I could do something like |
Actually reconsidering my suggestion... If we remove the directory and the backup fails, a user could be left backup-less. Maybe we could move the files in the directory to a temporary directory that gets deleted at the end of the script? @ehelms or @jlsherrill may have other ideas (see here for context) |
@johnpmitsch I added a '-f' so you should no longer get that error. It will overwrite the existing files without interrupting the backup now. |
@johnpmitsch the command would look different. The --preserve-directory flag does not require any arguments.
So in the case of wanting the incremental directory to be the same as the location which you're overwriting, it would look like this:
|
@cfouant I am seeing this when running
|
@johnpmitsch - please rereview, thanks! |
[test] |
nice change @cfouant! |
No description provided.