AWS Bucket (S3) Backup Configuration for Version 3.33

[From version 3.33]

On senhasegura is possible to do backup on AWS bucket (S3). To it, you need to have the information below:

  1. AWS Access Key ID (must);

  2. AWS Secret Access Key (must);

  3. Default region-name. If not informed, to default is the AWS server region.

IMPORTANT: ATTENTION ON VARIABLES BETWEEN “{}”. IT MUST CHANGE TO REAL VALUE.

  1. Run the command to configure the S3:

aws s3 sync /var/storage/senhasegura/backup/system

s3://{your_bucket_name}/{your_folder_name}

Exemple:

aws s3 sync /var/storage/senhasegura/backup/system s3://backupSenhasegura/Master

  1. Create the cron to it:

vim /etc/cron.d/aws_sync

  1. Insert this content:

1 05 * * * root /usr/local/bin/aws s3 sync /var/storage/senhasegura/backup/system/ s3://{your_bucket_name}/{your_folder_name}/ 2> /dev/null 1>/dev/null

*/60 * * * * root /usr/local/bin/aws s3 sync /var/storage/senhasegura/file/ s3://{your_bucket_name}/{your_folder_name}/ 2> /dev/null 1>/dev/null

*/15 * * * * root /usr/local/bin/aws s3 sync /var/storage/senhasegura/backup/secrets/ s3://{your_bucket_name}/{your_folder_name}/ 2> /dev/null 1>/dev/null

  1. Restart the cron service.

systemctl restart cron