You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copyright for portions of project mysql-backup-s3 are held by Johannes Schickling, 2017 as part of project Dockerfiles. All other copyright for project mysql-back-s3 are held by ITBM, 2019.
4
+
5
+
Permission is hereby granted, free of charge, to any person obtaining a copy
6
+
of this software and associated documentation files (the "Software"), to deal
7
+
in the Software without restriction, including without limitation the rights
8
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+
copies of the Software, and to permit persons to whom the Software is
10
+
furnished to do so, subject to the following conditions:
11
+
12
+
The above copyright notice and this permission notice shall be included in all
13
+
copies or substantial portions of the Software.
14
+
15
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-`POSTGRES_DATABASE` list of databases you want to backup (default: --all-databases)
68
+
-`POSTGRES_HOST` the postgresql host *required*
69
+
-`POSTGRES_PORT` the postgresql port (default: )
70
+
-`POSTGRES_USER` the postgresql user *required*
71
+
-`POSTGRES_PASSWORD` the postgresql password *required*
72
+
-`POSTGRES_EXTRA_OPTS` extra postgresql options
73
+
-`S3_ACCESS_KEY_ID` your AWS access key *required*
74
+
-`S3_SECRET_ACCESS_KEY` your AWS secret key *required*
75
+
-`S3_BUCKET` your AWS S3 bucket path *required*
76
+
-`S3_PREFIX` path prefix in your bucket (default: 'backup')
77
+
-`S3_REGION` the AWS S3 bucket region (default: us-west-1)
78
+
-`S3_ENDPOINT` the AWS Endpoint URL, for S3 Compliant APIs such as [minio](https://minio.io) (default: none)
79
+
-`S3_S3V4` set to `yes` to enable AWS Signature Version 4, required for [minio](https://minio.io) servers (default: no)
80
+
-`SCHEDULE` backup schedule time, see explainatons below
81
+
-`ENCRYPTION_PASSWORD` password to encrypt the backup. Can be decrypted using `openssl aes-256-cbc -d -in backup.sql.gz.enc -out backup.sql.gz`
82
+
-`DELETE_OLDER_THAN` delete old backups, see explanation and warning below
83
+
84
+
### Automatic Periodic Backups
85
+
86
+
You can additionally set the `SCHEDULE` environment variable like `-e SCHEDULE="@daily"` to run the backup automatically.
87
+
88
+
More information about the scheduling can be found [here](http://godoc.org/github.com/robfig/cron#hdr-Predefined_schedules).
89
+
90
+
### Delete Old Backups
91
+
92
+
You can additionally set the `DELETE_OLDER_THAN` environment variable like `-e DELETE_OLDER_THAN="30 days ago"` to delete old backups.
93
+
94
+
WARNING: this will delete all files in the S3_PREFIX path, not just those created by this script.
95
+
96
+
### Encryption
97
+
98
+
You can additionally set the `ENCRYPTION_PASSWORD` environment variable like `-e ENCRYPTION_PASSWORD="superstrongpassword"` to encrypt the backup. It can be decrypted using `openssl aes-256-cbc -d -in backup.sql.gz.enc -out backup.sql.gz`.
0 commit comments