Skip to content

Commit

Permalink
Quote password to avoid shell variable expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaiid committed Oct 27, 2024
1 parent eb3efdb commit 320354c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/backup_db_rds.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ task :backup_db_rds => :environment do

system("echo Copying of the database...")
backup_filename = "#{current_time}.rds.dump"
system("PGPASSWORD=#{ENV["DIAPER_DB_PASSWORD"]} pg_dump -Fc -v --host=#{ENV["DIAPER_DB_HOST"]} --username=#{ENV["DIAPER_DB_USERNAME"]} --dbname=#{ENV["DIAPER_DB_DATABASE"]} -f #{backup_filename}")
system("PGPASSWORD='#{ENV["DIAPER_DB_PASSWORD"]}' pg_dump -Fc -v --host=#{ENV["DIAPER_DB_HOST"]} --username=#{ENV["DIAPER_DB_USERNAME"]} --dbname=#{ENV["DIAPER_DB_DATABASE"]} -f #{backup_filename}")

account_name = ENV["AZURE_STORAGE_ACCOUNT_NAME"]
account_key = ENV["AZURE_STORAGE_ACCESS_KEY"]
Expand Down

0 comments on commit 320354c

Please sign in to comment.