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
|`DB_AUTH`| (Mongo Only - Optional) Authentication Database ||
140
-
|`DB_TYPE`| Type of DB Server to backup `couch``influx``mysql``pgsql``mongo``redis``sqlite3`||
141
-
|`DB_HOST`| Server Hostname e.g. `mariadb`. For `sqlite3`, full path to DB file e.g. `/backup/db.sqlite3`||
142
-
|`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`||
143
-
|`DB_NAME_EXCLUDE`| If using `ALL` - use this as to exclude databases seperated via commas from being backed up ||
144
-
|`DB_USER`| username for the database(s) - Can use `root` for MySQL ||
145
-
|`DB_PASS`| (optional if DB doesn't require it) password for the database ||
146
-
|`DB_PORT`| (optional) Set port to connect to DB_HOST. Defaults are provided | varies |
147
-
|`INFLUX_VERSION`| What Version of Influx are you backing up from `1`.x or `2` series - AMD64 and ARM64 only for `2`||
|`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_HOST_TYPE`| Connect to regular `mongodb` or `atlas`|`mongodb`|
153
+
|| You can also skip this and override the uri prefix with `MONGO_URI_PREFIX=mongodb+srv://` or whatever you would like ||
148
154
149
155
#### For Influx DB2:
150
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`
@@ -231,7 +237,33 @@ If you only enter some of the arguments you will be prompted to fill them in.
231
237
232
238
### Custom Scripts
233
239
234
-
If you want to execute a custom script at the end of backup, you can drop bash scripts with the extension of `.sh` in this directory. See the following example to utilize:
240
+
#### Pre Backup
241
+
If you want to execute a custom script before a backup starts, you can drop bash scripts with the extension of `.sh` in `/assets/custom/pre`. See the following example to utilize:
242
+
243
+
````bash
244
+
$ cat pre-script.sh
245
+
##!/bin/bash
246
+
247
+
# #### Example Pre Script
248
+
# #### $2=DB_TYPE (Type of Backup)
249
+
# #### $3=DB_HOST (Backup Host)
250
+
# #### #4=DB_NAME (Name of Database backed up
251
+
# #### $5=BACKUP START TIME (Seconds since Epoch)
252
+
# #### $8=BACKUP FILENAME (Filename)
253
+
254
+
echo"${2} Backup Starting on ${3} for ${4} on ${5} ending ${6} for a duration of ${7} seconds. Filename: ${8} Size: ${9} bytes MD5: ${10}"
`mysql Backup Starting on example-db for example on 1647370800. Filename: mysql_example_example-db_202200315-000000.sql.bz2
264
+
265
+
#### Post backup
266
+
If you want to execute a custom script at the end of backup, you can drop bash scripts with the extension of `.sh` in `/assets/custom`. See the following example to utilize:
0 commit comments