Repository navigation
Expand file tree
/
Copy pathmain.yml
More file actions
48 lines (39 loc) · 1.42 KB
/
Copy pathmain.yml
File metadata and controls
48 lines (39 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
## S3 host
# s3_backup_host:
## S3 credentials
# s3_backup_access_key:
# s3_backup_secret_key:
## S3 bucket name
# s3_backup_bucket:
## S3 bucket location
s3_backup_bucket_location: us-east-1
# Backup base path
s3_backup_base_path: /{{ inventory_hostname }}
## This is the 'OnCalendar' variable
## used in the systemd timer
s3_backup_timer_string: "*-*-* 03:30:00"
## Days to keep backups before deleting them again
s3_backup_retention: 14
## The user that executes the backup service
s3_backup_user: root
s3_backup_group: "{{ s3_backup_user }}"
## The backup script
## This should be a POSIX compliant shell script
## - TEMPDIR:
## A temporary directory will be created and cleaned up automatically.
## The backup script will run in that patch. So you can just write to the local directory.
## If you need the path in your script, just use the TEMPDIE variable.
## - DATE:
## Use the DATE variable to get the current date and time in the formnat 20260213-085111
## - s3_put:
## Use the s3_put command as a shortcut to upload files to S3.
## The file will be uploaded to s3_backup_base_path.
## s3_put src/backup.sql.gz dest/backup.sql.gz
# s3_backup_script: |
# FILENAME="${DATE}.sql.gz"
# mysqldump -u root --no-data dbname | gzip > "${TEMPDIE}/${FILENAME}"
# s3_put "${FILENAME}" "${FILENAME}"
## Path for backup metrics
## If empty, no metrics will be publishe
s3_backup_metrics_path: "{{ s3_backup_base_path }}/metrics"