Skip to content

Commit

Permalink
deprecate snapshot backups
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 9, 2023
1 parent b02a519 commit 819ca40
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions definitions/procedures/backup/snapshot_deprecation_message.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module Procedures::Backup
class SnapshotDeprecationMessage < ForemanMaintain::Check
metadata do
description 'Snapshot backups are deprecated'
tags :backup
end

def run
warn!('Snapshot backups are deprecated and will be removed in a future version.')
end
end
end

1 change: 1 addition & 0 deletions definitions/scenarios/backup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def include_dumps

# rubocop:disable Metrics/MethodLength
def add_snapshot_backup_steps
add_step_with_context(Procedures::Backup::SnapshotDeprecationMessage)
include_dumps if include_db_dumps?
add_step_with_context(Procedures::ForemanProxy::Features, :load_only => true)
add_steps_with_context(
Expand Down
2 changes: 1 addition & 1 deletion lib/foreman_maintain/cli/backup_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def execute
class BackupCommand < Base
subcommand 'online', 'Keep services online during backup', OnlineBackupCommand
subcommand 'offline', 'Shut down services to preserve consistent backup', OfflineBackupCommand
subcommand 'snapshot', 'Use snapshots of the databases to create backup', SnapshotBackupCommand
subcommand 'snapshot', 'Use snapshots of the databases to create backup (DEPRECATED)', SnapshotBackupCommand
end
# rubocop:enable Metrics/LineLength
end
Expand Down

0 comments on commit 819ca40

Please sign in to comment.