foreman_maintain 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 467793fe18d5403460cbb877a9b42e8b6c9f82aaf3e876988c444baf0d472e17
4
- data.tar.gz: f963b22148f4e08f0daee4a2af1fd479bc655aff1ec6b14c41fe249b51d4e188
3
+ metadata.gz: d90e54ce37bbcb97b38d4362699d2e5fdec4bb6a9c73a6449cebc1c6a20cf970
4
+ data.tar.gz: 79ddf0919edb2fd587d06d414ade8b01994d197f61069dab8bb2d03c22ad72f3
5
5
  SHA512:
6
- metadata.gz: cfce108a55c8f37f82da2b07081a3362f47267a95926e105c74dfc6602eb48ee424603026c9aec32d26e263a1e84deab68a7008953bcfece418029533d14376c
7
- data.tar.gz: 8e8f0b94739d7e03f1ca3e8f197013780c030ab46a9d5c6f81c4ee7d2169d37c5d9a21fdd779544c947abb87b8346f67b2b9de7ebe2707c94b6afc4ec9e7298b
6
+ metadata.gz: 11c9f890ad98bdac65ca98df002386f6c5435a67b2374e1349d7dc8f53cf79a3587f5ff6f449c0b1f5a7b1a24cb9e96254706c9b2eb9e257679cb1eead8b6831
7
+ data.tar.gz: d827ab0345f35720c3a1eaae0779593b56c6c577f8a72c0aacccc5210cc4d629f8f1a7c2f8afd5371dbdfb042fc2b79414f457d4d69afdbe203d196eb97d60d5
@@ -36,7 +36,8 @@ module Procedures::Backup
36
36
  pg_backup_file,
37
37
  :listed_incremental => File.join(@backup_dir, '.postgres.snar'),
38
38
  :volume_size => @tar_volume_size,
39
- :data_dir => pg_data_dir
39
+ :data_dir => pg_data_dir,
40
+ :restore_dir => feature(:candlepin_database).data_dir
40
41
  )
41
42
  end
42
43
  end
@@ -39,11 +39,13 @@ module Procedures::Backup
39
39
  end
40
40
 
41
41
  def do_backup(pg_dir, cmd)
42
+ restore_dir = el? ? feature(:foreman_database).data_dir : pg_dir
42
43
  feature(:foreman_database).backup_local(
43
44
  pg_backup_file,
44
45
  :listed_incremental => File.join(@backup_dir, '.postgres.snar'),
45
46
  :volume_size => @tar_volume_size,
46
47
  :data_dir => pg_dir,
48
+ :restore_dir => restore_dir,
47
49
  :command => cmd
48
50
  )
49
51
  end
@@ -36,7 +36,8 @@ module Procedures::Backup
36
36
  pg_backup_file,
37
37
  :listed_incremental => File.join(@backup_dir, '.postgres.snar'),
38
38
  :volume_size => @tar_volume_size,
39
- :data_dir => pg_data_dir
39
+ :data_dir => pg_data_dir,
40
+ :restore_dir => feature(:pulpcore_database).data_dir
40
41
  )
41
42
  end
42
43
  end
@@ -101,13 +101,14 @@ module ForemanMaintain
101
101
 
102
102
  def backup_local(backup_file, extra_tar_options = {})
103
103
  dir = extra_tar_options.fetch(:data_dir, data_dir)
104
+ restore_dir = extra_tar_options.fetch(:restore_dir, data_dir)
104
105
  command = extra_tar_options.fetch(:command, 'create')
105
106
 
106
107
  FileUtils.cd(dir) do
107
108
  tar_options = {
108
109
  :archive => backup_file,
109
110
  :command => command,
110
- :transform => "s,^,#{dir[1..]},S",
111
+ :transform => "s,^,#{restore_dir[1..]},S",
111
112
  :files => '*',
112
113
  }.merge(extra_tar_options)
113
114
  feature(:tar).run(tar_options)
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.3.4'.freeze
2
+ VERSION = '1.3.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -433,7 +433,7 @@ homepage: https://github.com/theforeman/foreman_maintain
433
433
  licenses:
434
434
  - GPL-3.0
435
435
  metadata: {}
436
- post_install_message:
436
+ post_install_message:
437
437
  rdoc_options: []
438
438
  require_paths:
439
439
  - lib
@@ -451,8 +451,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
451
451
  - !ruby/object:Gem::Version
452
452
  version: '0'
453
453
  requirements: []
454
- rubygems_version: 3.4.10
455
- signing_key:
454
+ rubygems_version: 3.3.26
455
+ signing_key:
456
456
  specification_version: 4
457
457
  summary: Foreman maintenance tool belt
458
458
  test_files: []