backup revision dfff4029890084ba790248aca3a952547a78c5cb
# Amount of backups that have to be there at least # Backups are valid for 7 days # We needed to create the directory for the script to continue later on. puts "created backup in #{backup_instance_dir}" puts "restored backup from #{backup_instance_dir}" puts "Nothing to prune: There is no backup directory." puts "removing old backup: #{dir}" # Create directory even in dry run to let the script continue. exec "pg_dump#{pg_user_switch} -Fc #{db_name} > #{SQL_DUMP_FILE}" puts "Error: Backup '#{backup_name}' does not exist in #{backup_root}." exec "pg_restore -c#{pg_user_switch} -d #{db_name} #{SQL_DUMP_FILE}" puts 'To restore a backup, you need to specify one with the arguments' puts '"restore backup_name"' puts 'unknown or missing parameter' puts 'use parameter "create" or "restore <backup_name>" or "prune"'