Skip to content

Commit

Permalink
Only adjust restore_dir on EL-based systems
Browse files Browse the repository at this point in the history
We do not support snapshots on Debian-based systems right now, and the differences in the DB setup would break normal backups on Debian otherwise.
  • Loading branch information
evgeni authored Aug 16, 2023
1 parent 995f012 commit b2d80aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion definitions/procedures/backup/offline/foreman_db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ def local_backup
end

def do_backup(pg_dir, cmd)
restore_dir = el? ? feature(:foreman_database).data_dir : pg_dir
feature(:foreman_database).backup_local(
pg_backup_file,
:listed_incremental => File.join(@backup_dir, '.postgres.snar'),
:volume_size => @tar_volume_size,
:data_dir => pg_dir,
:restore_dir => feature(:foreman_database).data_dir,
:restore_dir => restore_dir,
:command => cmd
)
end
Expand Down

0 comments on commit b2d80aa

Please sign in to comment.