Skip to content

Commit

Permalink
Fixes #27051 add --include-db-dumps for snapshot backups
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpunk committed Jun 13, 2019
1 parent 3037c05 commit f5bc02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions definitions/scenarios/backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def include_dumps

# rubocop:disable Metrics/MethodLength
def add_snapshot_backup_steps
include_dumps if include_db_dumps?
add_steps_with_context(
Procedures::Backup::Snapshot::PrepareMount,
find_procedures(:maintenance_mode_on),
Expand Down
4 changes: 3 additions & 1 deletion lib/foreman_maintain/cli/backup_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class SnapshotBackupCommand < Base
include BackupCommon
interactive_option
common_backup_options
option '--include-db-dumps', :flag, 'Also dump full database schema before snapshot backup'
option ['-d', '--snapshot-mount-dir'], 'SNAPSHOT_MOUNT_DIR',
"Override default directory ('/var/snap/') where the snapshots will be mounted",
:default => '/var/snap/' do |dir|
Expand All @@ -144,7 +145,8 @@ class SnapshotBackupCommand < Base
def execute
perform_backup(:snapshot,
:snapshot_mount_dir => snapshot_mount_dir,
:snapshot_block_size => snapshot_block_size)
:snapshot_block_size => snapshot_block_size,
:include_db_dumps => include_db_dumps?)
end
end

Expand Down

0 comments on commit f5bc02b

Please sign in to comment.