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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## develop 2022-09-20 <daveattiredofitdotca>
2
+
3
+
### Added
4
+
- MONGO_CUSTOM_URI support to ignore the seperate environment variables - Parses the URI and populates DB_HOST and DB_NAME for filenaming. Can be overridden
Copy file name to clipboardExpand all lines: README.md
+22-24Lines changed: 22 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,15 +37,14 @@ Currently backs up CouchDB, InfluxDB, MySQL, MongoDB, Postgres, Redis servers.
37
37
-[About](#about)
38
38
-[Maintainer](#maintainer)
39
39
-[Table of Contents](#table-of-contents)
40
-
-[Persistent Storage](#persistent-storage)
41
40
-[Prerequisites and Assumptions](#prerequisites-and-assumptions)
42
41
-[Installation](#installation)
43
42
-[Build from Source](#build-from-source)
44
43
-[Prebuilt Images](#prebuilt-images)
45
44
-[Multi Architecture](#multi-architecture)
46
45
-[Configuration](#configuration)
47
46
-[Quick Start](#quick-start)
48
-
-[Persistent Storage](#persistent-storage-1)
47
+
-[Persistent Storage](#persistent-storage)
49
48
-[Environment Variables](#environment-variables)
50
49
-[Base Images used](#base-images-used)
51
50
-[Container Options](#container-options)
@@ -70,7 +69,6 @@ Currently backs up CouchDB, InfluxDB, MySQL, MongoDB, Postgres, Redis servers.
70
69
-[License](#license)
71
70
72
71
> **NOTE**: If you are using this with a docker-compose file along with a seperate SQL container, take care not to set the variables to backup immediately, more so have it delay execution for a minute, otherwise you will get a failed first backup.
73
-
### Persistent Storage
74
72
75
73
## Prerequisites and Assumptions
76
74
* You must have a working connection to one of the supported DB Servers and appropriate credentials
@@ -140,32 +138,32 @@ Be sure to view the following repositories to understand all the customizable op
140
138
|`SPLIT_DB`| For each backup, create a new archive. `TRUE` or `FALSE` (MySQL and Postgresql Only) |`TRUE`|
|`DB_AUTH`| (Mongo Only - Optional) Authentication Database ||
146
-
|`DB_TYPE`| Type of DB Server to backup `couch``influx``mysql``pgsql``mongo``redis``sqlite3`||
147
-
|`DB_HOST`| Server Hostname e.g. `mariadb`. For `sqlite3`, full path to DB file e.g. `/backup/db.sqlite3`||
148
-
|`DB_NAME`| Schema Name e.g. `database` or `ALL` to backup all databases the user has access to. Backup multiple by seperating with commas eg `db1,db2`||
149
-
|`DB_NAME_EXCLUDE`| If using `ALL` - use this as to exclude databases seperated via commas from being backed up ||
150
-
|`DB_USER`| username for the database(s) - Can use `root` for MySQL ||
151
-
|`DB_PASS`| (optional if DB doesn't require it) password for the database ||
152
-
|`DB_PORT`| (optional) Set port to connect to DB_HOST. Defaults are provided | varies |
153
-
|`INFLUX_VERSION`| What Version of Influx are you backing up from `1`.x or `2` series - AMD64 and ARM64 only for `2`||
154
-
|`MONGO_HOST_TYPE`|Connect to regular `mongodb` or `atlas`|`mongodb`|
155
-
|| You can also skip this and override the uri prefix with `MONGO_URI_PREFIX=mongodb+srv://` or whatever you would like ||
|`DB_AUTH`| (Mongo Only - Optional) Authentication Database||
144
+
|`DB_TYPE`| Type of DB Server to backup `couch``influx``mysql``pgsql``mongo``redis``sqlite3`||
145
+
|`DB_HOST`| Server Hostname e.g. `mariadb`. For `sqlite3`, full path to DB file e.g. `/backup/db.sqlite3`||
146
+
|`DB_NAME`| Schema Name e.g. `database` or `ALL` to backup all databases the user has access to. Backup multiple by seperating with commas eg `db1,db2`||
147
+
|`DB_NAME_EXCLUDE`| If using `ALL` - use this as to exclude databases seperated via commas from being backed up||
148
+
|`DB_USER`| username for the database(s) - Can use `root` for MySQL||
149
+
|`DB_PASS`| (optional if DB doesn't require it) password for the database||
150
+
|`DB_PORT`| (optional) Set port to connect to DB_HOST. Defaults are provided| varies |
151
+
|`INFLUX_VERSION`| What Version of Influx are you backing up from `1`.x or `2` series - AMD64 and ARM64 only for `2`||
152
+
|`MONGO_CUSTOM_URI`|If you wish to override the MongoDB Connection string enter it here e.g. `mongodb+srv://username:[email protected]`||
153
+
|| This environment variable will be parsed and populate the `DB_NAME` and `DB_HOST` variables to properly build your backup filenames. You can overrde them by making your own entries|
156
154
157
155
#### For Influx DB2:
158
156
Your Organization will be mapped to `DB_USER` and your root token will need to be mapped to `DB_PASS`. You may use `DB_NAME=ALL` to backup the entire set of databases. For `DB_HOST` use syntax of `http(s)://db-name`
|`DB_DUMP_FREQ`| How often to do a dump, in minutes after the first backup. Defaults to 1440 minutes, or once per day. |`1440`|
164
-
|`DB_DUMP_BEGIN`| What time to do the first dump. Defaults to immediate. Must be in one of two formats ||
165
-
|| Absolute HHMM, e.g. `2330` or `0415`||
166
-
|| Relative +MM, i.e. how many minutes after starting the container, e.g. `+0` (immediate), `+10` (in 10 minutes), or `+90` in an hour and a half ||
167
-
|`DB_DUMP_TARGET`| Directory where the database dumps are kept. |`/backup`|
168
-
|`DB_CLEANUP_TIME`| Value in minutes to delete old backups (only fired when dump freqency fires). 1440 would delete anything above 1 day old. You don't need to set this variable if you want to hold onto everything. |`FALSE`|
|`DB_DUMP_FREQ`| How often to do a dump, in minutes after the first backup. Defaults to 1440 minutes, or once per day. |`1440`|
162
+
|`DB_DUMP_BEGIN`| What time to do the first dump. Defaults to immediate. Must be in one of two formats ||
163
+
|| Absolute HHMM, e.g. `2330` or `0415`||
164
+
|| Relative +MM, i.e. how many minutes after starting the container, e.g. `+0` (immediate), `+10` (in 10 minutes), or `+90` in an hour and a half ||
165
+
|`DB_DUMP_TARGET`| Directory where the database dumps are kept. |`/backup`|
166
+
|`DB_CLEANUP_TIME`| Value in minutes to delete old backups (only fired when dump freqency fires). 1440 would delete anything above 1 day old. You don't need to set this variable if you want to hold onto everything. |`FALSE`|
169
167
170
168
171
169
- You may need to wrap your `DB_DUMP_BEGIN` value in quotes for it to properly parse. There have been reports of backups that start with a `0` get converted into a different format which will not allow the timer to start at the correct time.
0 commit comments