update mysql_database_backup.rb

This commit is contained in:
connorc@orbitnode.net 2023-03-18 11:32:25 -06:00
parent 4aad19d2bf
commit 0bd8a1b932

View File

@ -55,7 +55,7 @@ class MysqlDatabaseBackup
b2_file_url = "b2://#{@b2_bucket_name}/#{b2_file_name}"
# Check if a backup file with the same name already exists in the B2 bucket
existing_file = `b2-cli list-file-names #{@b2_bucket_name} --prefix #{b2_file_name}`
existing_file = `b2 list-file-names #{@b2_bucket_name} --prefix #{b2_file_name}`
if existing_file.include?(b2_file_name)
# Delete the existing backup file from the B2 bucket
file_id = existing_file.match(/"fileId": "([^"]+)"/)[1]