Setting up a backup on B2 / DONE
https://www.backblaze.com/
Last updated
https://www.backblaze.com/
Last updated
Create an account in the system https://www.backblaze.com/
Activate B2 cloud storage for this: Log in to your account -> My Settings -> Enabled Products -> [+] B2 Cloud Storage
Create a basket where we will save:
ПAfter that we need to create an App key that can only make a record without the ability to delete the already created backup unfortunately it can not be done through the panel so we created a script that can create a secure key through API backblaze)
To do this we need to:
Clone repo:
Go to the project folder:
Install Packages:
Get Master KEY (must be changed after creation)
Create a key:
B2 application key ID: keyID obtained in the previous step B2 application key: applicationKey obtained in the previous step
B2 buckets ID: Buckets -> Your bucket -> Bucket ID
Copy the obtained keys to install them on our server. (temporarily save them in a text file)
Recreate the key obtained at step 4.4 so that the old one is no longer available (it is no longer necessary to copy it)
Install rclone on the server.
Install the obtained keys on the server using the following commands:
Next, we will be asked to answer questions:
Configure backup.sh to properly create the backup and notify the administrator.
Configuring the block # -- Configuration --
8. Give permissions to run the bash-script file backup.sh
9. Check the work of the backup script
10. Set auto backup by crown (in the example every day at 4am server time usually GMT).
Root privileges are required for the script to work.
By default, the script looks for the API configuration in the folder
/var/www/exchanger-api/config/app_config.json
.
If you have a different way fix it in the BOXEXCHANGER_API_PATH
fily backup.sh
in section
# -- Init Default Vars --
It is mandatory to have a uri to mongodb in the configuration file