Commit Graph

67 Commits

Author SHA1 Message Date
connorc@orbitnode.net
b746eedac6 Add code to delete all non-matching files in a Backblaze B2 bucket before uploading a new backup file
This commit modifies the upload_to_b2 method in the MysqlDatabaseBackup class to delete all files in the specified Backblaze B2 bucket that do not match the name of the backup file being uploaded. The implementation retrieves a list of all files in the bucket using the b2 ls command and then iterates over each line to extract the name of each file. If the name of a file does not match the name of the backup file, the implementation extracts its file ID using a regular expression and then uses the b2 delete-file-version command to delete the file from the bucket. Finally, the implementation uploads the backup file to the B2 bucket.
2023-03-18 11:59:58 -06:00
connorc@orbitnode.net
2c960727d6 Add code to find and delete an existing backup file in a Backblaze B2 bucket before uploading a new backup file
This commit modifies the upload_to_b2 method in the MysqlDatabaseBackup class to search for an existing backup file with the same name as the backup file being uploaded in a specified Backblaze B2 bucket. The implementation retrieves a list of all files in the bucket using the b2 ls command and then iterates over each line to search for a file with the same name as the backup file. If a matching file is found, the implementation extracts its file ID using a regular expression and then uses the b2 delete-file-version command to delete the file from the bucket. Note that this implementation assumes that the backup file has a unique name.
2023-03-18 11:57:03 -06:00
connorc@orbitnode.net
0bd8a1b932 update mysql_database_backup.rb 2023-03-18 11:32:25 -06:00
connorc@orbitnode.net
4aad19d2bf update mysql_database_backup.rb 2023-03-18 11:28:55 -06:00
connorc@orbitnode.net
abe713024b update mysql_database_backup.rb 2023-03-18 10:32:17 -06:00
connorc@orbitnode.net
cff8ebcedd update mysql_database_backup.rb 2023-03-18 10:30:15 -06:00
connorc@orbitnode.net
23ad4be9ae update mysql_database_backup.rb 2023-03-18 10:25:07 -06:00
connorc@orbitnode.net
1ed4651679 Refactor generate method in MysqlDatabaseConfig class
The generate method in the MysqlDatabaseConfig class had an error that caused an undefined local variable or method 'config'. The error was due to using the config variable before it was initialized. The solution was to move the code that sets b2_enabled and adds b2 to config after the config variable is initialized. This commit fixes the error by modifying the generate method in the MysqlDatabaseConfig class.
2023-03-18 10:20:18 -06:00
connorc@orbitnode.net
496be85eaa Fix B2 bucket upload issue and store b2_enabled in config
This commit addresses two main issues:

    The 'b2_enabled' value was not being stored in the config JSON. Added it to the config JSON to enable or disable B2 bucket uploads as needed.
    Corrected the execution of b2-cli commands in the MysqlDatabaseBackup class using backticks for proper shell command execution in Ruby.

These changes should resolve the issue of the database dump file not being uploaded to the B2 bucket.
2023-03-17 10:23:31 -06:00
connorc@orbitnode.net
e73eef1064 Change fro b2 gem to b2 cli 2023-03-17 10:02:03 -06:00
VetheonGames
d406dd0512
Create ruby.yml 2023-02-28 10:11:08 -08:00
VetheonGames
533b5bc79b
Update README.md 2023-02-28 10:10:00 -08:00
VetheonGames
8a8112a9a6
Update README.md 2023-02-28 10:09:42 -08:00
VetheonGames
b062c92f35
Update README.md 2023-02-23 17:54:38 -07:00
VetheonGames
b0db38a691
Create the readme 2023-02-23 17:53:55 -07:00
VetheonGames
bcfd201c4b
Commit finished beta 2023-02-23 15:42:16 -07:00
VetheonGames
5620b70916
Initial commit 2023-02-23 15:41:42 -07:00