Commit Graph

48 Commits

Author SHA1 Message Date
Asif Bacchus 46b29dfce9 fix(script): fix dockerCmd quoting error 2022-07-15 13:49:59 -06:00
Asif Bacchus 818483f92e refactor(vars): quote dockerCmd calls 2022-07-12 14:54:17 -06:00
Asif Bacchus c8b328e707 fix(typos): fix various typos 2022-07-12 12:52:37 -06:00
Asif Bacchus fb4dcab29a chore(shellcheck): ignore some warnings 2022-07-12 12:50:42 -06:00
Asif Bacchus 5382dd26d9 fix(cleanup): prevent doDocker error loop
- if doDocker throws an error, cleanup is called which again calls doDocker
- resolve this loop by passing a variable from cleanup
2022-07-12 12:47:52 -06:00
Asif Bacchus bd36035a9f refactor(compose): update container name lookup
- filter by both compose v1 and v2 naming conventions
2022-07-12 12:34:26 -06:00
Asif Bacchus 389f5ef059 feature(compose): detect and use proper compose cmd
- check for compose v2 and use 'docker compose'
- if v2 not detected, fallback to 'docker-compose'
2022-07-12 12:31:24 -06:00
Asif Bacchus 8d10a1a3b9 feature(version): add param to display version
- as per user request
2022-07-12 11:36:57 -06:00
Asif Bacchus 1334975cab fix(BACKUP): fix colour var usage
SQL dump success and REDIS dump success msg printed 'cyan' instead of
using the colour var
2021-03-08 00:50:55 -07:00
Asif Bacchus 19d1eb1587 refactor(BACKUP): prevent alias cmds
- prefix cp and cd with \ to prevent alias cmd
- fix typo in comment
2021-03-08 00:40:11 -07:00
Asif Bacchus 4aae61f97e feature(BACKUP): allow non-default borg location
- parameter to specify non-default borg program location

Closes github #10
2021-03-08 00:36:32 -07:00
Asif Bacchus 5ea25529b9 feature(BACKUP): add SSH port customization
- borgSSHPort variable in details file
- read and appended to RSH connection string
- default to standard port 22

Closes github #9
2021-03-08 00:08:22 -07:00
Asif Bacchus de76918e81 feature(BACKUP): parameterize log colourization
Closes github #9
2021-03-07 23:54:32 -07:00
Asif Bacchus f2231c7074 fix(BACKUP): change borg cmd
- place common-options after borg command verb
- thanks to lluis

Closes github 7
2021-02-09 16:56:38 -07:00
Asif Bacchus 85e34c73a3 feature(BACKUP): add compression option
- parameter to specify compression used by borg
- as requested by shaneonabike (via github)

Closes github 5
2021-02-09 08:22:48 -07:00
Asif Bacchus 9e592633b9 fix(BACKUP): bypass possible cd aliases 2021-02-09 08:03:23 -07:00
Asif Bacchus e127616800 fix(BACKUP): fix missing parameter shift
- docker timeout parameters
2021-02-09 08:02:34 -07:00
Asif Bacchus 2b5f8a0887 fix(BACKUP): initialize sqlDumpDirCreated
- initialize sqlDumpDirCreated to avoid 'unary operator expected' error

Closes 7
2021-02-05 01:11:16 -07:00
Asif Bacchus 85fae7f6c8 build(SHELLCHECK): add source paths
- add dummy mailcow.conf
- add source directives
- allows easier error checking using shellcheck
2021-02-05 01:08:23 -07:00
Asif Bacchus 7293a29a05 include mailcow.conf directory in backup 2020-05-07 04:59:37 -06:00
Asif Bacchus 8486c4b7d2 make xtraList optional 2020-05-07 04:58:26 -06:00
Asif Bacchus f57841b69a update in-script help 2020-05-07 01:43:53 -06:00
Asif Bacchus 4d407887d5 change default docker-compose path 2020-05-07 01:35:20 -06:00
Asif Bacchus 6f59804cfc docker-compose and mailcow-config accept full path 2020-05-07 01:34:43 -06:00
Asif Bacchus b5247a085e switch to mailcow directory to allow docker cmds 2020-05-07 01:10:26 -06:00
Asif Bacchus 2432139f3d simplify mcConfig existance check 2020-05-07 01:08:36 -06:00
Asif Bacchus 5f0eddf22a add mailcow.conf location in docker-compose cmds 2020-05-07 01:00:14 -06:00
Asif Bacchus 09c1d903ba move sql dump earlier in script
Borg requires the default TMP dir be changed to avoid permissions issue.
Moving earlier means SQL dumps to system default TMP location.
2020-05-07 00:58:27 -06:00
Asif Bacchus 51928d4327 fix error in default docker-compose location 2020-05-07 00:47:34 -06:00
Asif Bacchus 0993083a7b mark script executable 2020-05-07 00:33:50 -06:00
Asif Bacchus f8561a3aab restart docker containers in cleanup function 2020-05-07 00:17:41 -06:00
Asif Bacchus 1b68616e54 fix wrong container name 2020-05-07 00:16:01 -06:00
Asif Bacchus 51120491d5 add mc locations to borgbackup cmd 2020-05-07 00:08:47 -06:00
Asif Bacchus abdbb44922 dump redis db 2020-05-07 00:01:21 -06:00
Asif Bacchus ca62d81368 dump sql 2020-05-06 23:54:31 -06:00
Asif Bacchus 72e396fa64 fix error in printf format string 2020-05-06 23:53:02 -06:00
Asif Bacchus 992f8ef16e stop containers before backup starts 2020-05-06 23:38:26 -06:00
Asif Bacchus 9d7b7e1a94 add func doDocker 2020-05-06 23:32:53 -06:00
Asif Bacchus 4fb6315643 clean up function names for consistency 2020-05-06 23:18:01 -06:00
Asif Bacchus d9c662bb45 move sql temp dir creation and 503-copy
moved to after borg configuration checks to consoldate checks vs actions
2020-05-06 23:02:07 -06:00
Asif Bacchus e9884a347f note err code for sql temp dir creation fail 2020-05-06 22:59:35 -06:00
Asif Bacchus 8a5a87db12 add SQL directory to cleanup 2020-05-06 22:57:41 -06:00
Asif Bacchus 0d32aaf40a change sql temp dir creation process 2020-05-06 22:56:52 -06:00
Asif Bacchus bb952a3aba get and report mc volumes, sql backup location 2020-05-06 22:30:58 -06:00
Asif Bacchus dccf5e17d0 source and use mailcow.conf 2020-05-06 22:30:19 -06:00
Asif Bacchus 35ce452dec fix var declaration 2020-05-06 22:30:03 -06:00
Asif Bacchus 604d3da07d add mc params, defaults and pre-req checks 2020-05-06 22:15:55 -06:00
Asif Bacchus a5bc4549e9 basic import from generic backup script 2020-05-06 21:29:48 -06:00