Merge pull request 'auto backups and purging system deployment' (#2) from blog/auto-backs into master
Reviewed-on: #2
This commit is contained in:
commit
4e7d4cda7b
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
# Default ignored files
|
||||||
|
/workspace.xml
|
27
Auto-backs.md
Normal file
27
Auto-backs.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Instruction guide to deploy auto backup system on vps
|
||||||
|
|
||||||
|
## About this guide
|
||||||
|
* Helps you deploy auto backup system on vps.
|
||||||
|
* It will create backup of NC, Gitea and influxdb for historical data of forex and bkm
|
||||||
|
* Upload this backup on Wasabi cloud
|
||||||
|
* Purge backups on vps and wasabi cloud
|
||||||
|
* Last but not the Generates some logs etc.
|
||||||
|
|
||||||
|
##Usage
|
||||||
|
|
||||||
|
1. Go to roles -> auto-backup -> defaults -> main.yml
|
||||||
|
* Provide details of NC and Gitea databases
|
||||||
|
2. After that run following command to start deploying auto backup on vps
|
||||||
|
`$ansible-playbook -i inventory/inventory.ini playbooks/auto-backup-playbook.yml`
|
||||||
|
3. Lastly you need to execute purging system, run following command
|
||||||
|
`$ansible-playbook -i inventory/inventory.ini playbooks/purge-backup-playbook.yml`
|
||||||
|
|
||||||
|
## Other configs
|
||||||
|
* Auto backs are scheduled using systemd service and timers, if you want to configure auto back timer you can go to
|
||||||
|
`playbooks/auto-backup-playbook.yml`
|
||||||
|
Under `unit_config` you can provide new time for each timer.
|
||||||
|
* Purging system can also be customized, go to
|
||||||
|
`playbooks/purge-backup-playbook.yml`
|
||||||
|
Again under `unit_config`, you will find timer where you can change time for this.
|
||||||
|
|
||||||
|
|
30
Wasabi-util-usage.md
Normal file
30
Wasabi-util-usage.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Wasabi Golang util usage guide
|
||||||
|
|
||||||
|
Features of this util are
|
||||||
|
1. To upload data files on to the wasabi cloud.
|
||||||
|
2. Purge data which is older then defined time line.
|
||||||
|
|
||||||
|
Now lets talk about the usage.
|
||||||
|
|
||||||
|
1. You would need to place `configs.toml` inside `configs` directory.
|
||||||
|
2. Place `wasabi-util-upload` binary on root.
|
||||||
|
3. Run following command to upload files on wasabi
|
||||||
|
|
||||||
|
* $./wasabi-util-upload --fileName file_name.sql --path /home/data upload
|
||||||
|
|
||||||
|
Note:- Here `upload` is command, --fileName is name of data file and --path is location of this data file
|
||||||
|
4. Run following command to initiate purging process on wasabi
|
||||||
|
* $./wasabi-util-upload purge
|
||||||
|
|
||||||
|
Note:- `purge` is command, for more details on toml configs please review below section.
|
||||||
|
|
||||||
|
|
||||||
|
## configs.toml
|
||||||
|
|
||||||
|
You will need to provide following details in `configs.toml` in order for this util to work properly.
|
||||||
|
|
||||||
|
1. `Region` => When creating bucket on wasabi you select region and it has to be provided here.
|
||||||
|
2. `AccessID` and `AccessSecert` => These can be generated using this [link](https://preventdirectaccess.com/docs/create-wasabi-bucket-get-access-keys/#:~:text=3.-,Create%20an%20IAM%20user%20%26%20get%20access%20keys,enter%20details%20for%20the%20user.)
|
||||||
|
3. `EndPoint`=> This is static depending on region i.e `https://s3.eu-central-1.wasabisys.com`
|
||||||
|
4. `BucketName` => Provide bucket name that you just created.
|
||||||
|
5. `PurgeHours` => You need to provide time in hours, this is the time, before which all data files will be purged.
|
Loading…
Reference in a new issue