[From version 3.33]
On senhasegura is possible to do backup on AWS bucket (S3). To it, you need to have the information below:
-
AWS Access Key ID (must);
-
AWS Secret Access Key (must);
-
Default region-name. If not informed, to default is the AWS server region.
IMPORTANT: ATTENTION ON VARIABLES BETWEEN “{}”. IT MUST CHANGE TO REAL VALUE.
- 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
- Create the cron to it:
vim /etc/cron.d/aws_sync
- 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
- Restart the cron service.
systemctl restart cron