Usage
This documentation will guide you on how to properly set up your bqckup.
Step 1: Create config for the storages
Storage Config Stored in /etc/bqckup/config/storage.yml
storages:
ojtbackup:
bucket: ${BUCKET_NAME}
access_key_id: ${ACCESS_KEY}
secret_access_key: ${SECRET_KEY}
region: ${REGION}
endpoint: ${ENDPOINT_URL}
primary: yes
There is also an option for remote storage, which you can read it here.
Step 2: Create config for your backup
The configuration can be created in /etc/bqckup/sites/your-config-name.yml
.
bqckup:
name: ${name}
path:
- ${path}
database:
type: mysql #Currently only support mysql
host: localhost
port: 3306
user: ${db_user}
password: ${db_password}
name: ${db_name}
options:
storage: ${storage_name} #can be found at /etc/bqckup/config/storages.yml
interval: daily # daily | weekly | monthly
retention: 7
save_locally: no # It will not delete your backup after it has been uploaded.
save_locally_path: /home/user/_backups
provider: s3
If it’s incremental, you can append this
incremental:
enable: yes
password: mystrongpassword
In the background, bqckup uses rustic for incremental backups, so you need to install rustic to make the incremental backup work.
Step 3: Run the bqckup
After completing those setups, run bqckup using the following command:
bqckup run
Step 4: Create a cron job to schedule your backup.
If you want it to be executed daily, for example, create a cron job by adding a script inside /etc/cron.daily/bqckup
.
Command:
touch /etc/cron.daily/bqckup && chmod +x /etc/cron.daily/bqckup
and the content:
/usr/bin/bqckup run >> /var/log/bqckup.log 2>&1
Last updated
Was this helpful?