Skip to content

Commit 4b11f23

Browse files
committed
Delete dump files after backup
1 parent 237090e commit 4b11f23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/jobs/backup_db_rds.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ def self.run
1818
client.put_object(key: "backups/#{backup_filename}",
1919
body: File.read(backup_filename),
2020
bucket: "human-essentials-backups")
21+
22+
Dir.glob(Rails.root.join("*.rds.dump")).each do |file|
23+
File.delete(file)
24+
end
2125
end
2226
end

0 commit comments

Comments
 (0)