|
21 | 21 |
|
22 | 22 | # Filename |
23 | 23 | backups['filename'] = |
24 | | - if node['bonusbits_base']['aws']['inside'] |
| 24 | + if node['bonusbits_base']['deployment_type'] == 'ec2' |
25 | 25 | "#{node['ec2']['instance_id']}-backup.tar.gz" |
26 | 26 | else |
27 | 27 | 'backups.tar.gz' |
28 | 28 | end |
29 | 29 |
|
30 | 30 | # S3 |
31 | 31 | ## Recommended to turn on Versioning and add Lifecycle to bucket |
32 | | - env = run_state['detected_environment'] |
33 | | - backups['s3_path'] = "backup_bucket/backups/#{env}" # !! Required Override !! |
| 32 | + backups['s3_bucket_name'] = 'backup_bucket' # !! Required Override !! |
34 | 33 | filename = node['bonusbits_base']['backups']['filename'] |
35 | | - s3_path = node['bonusbits_base']['backups']['s3_path'] |
36 | | - backups['s3_full_path'] = "#{s3_path}/#{filename}" |
| 34 | + env = run_state['detected_environment'] |
| 35 | + s3_backup_bucket = node['bonusbits_base']['backups']['s3_bucket_name'] |
| 36 | + backups['s3_full_path'] = "#{s3_backup_bucket}/backups/#{env}/#{filename}" |
37 | 37 |
|
38 | 38 | # Cron |
39 | 39 | ## Default is Daily at 11PM Server Time |
|
57 | 57 | "Script Filename (#{node['bonusbits_base']['backups']['script_filename']})", |
58 | 58 | "Script Fullname (#{node['bonusbits_base']['backups']['script_fullname']})", |
59 | 59 | "Local Temp Path (#{node['bonusbits_base']['backups']['local_tmp_path']})", |
60 | | - "S3 Path (#{node['bonusbits_base']['backups']['s3_path']})", |
61 | 60 | "S3 Full Path (#{node['bonusbits_base']['backups']['s3_full_path']})", |
62 | 61 | "Config Log Rotate (#{node['bonusbits_base']['backups']['configure_log_rotate']})", |
63 | 62 | "Log Path (#{node['bonusbits_base']['backups']['log_path']})" |
|
0 commit comments