sund / auto-gitlab-backup

A simple script to backup your Gitlab data. This script will copy the backup archives of your gitlab installation via rsync, or scp. Also, you can copy backups to Backblaze’s B2 Cloud Storage service.
http://sund.github.io/auto-gitlab-backup/
GNU General Public License v2.0
317 stars 73 forks source link

fixed script crash on machines without b2 #52

Closed dmitry-kovalev closed 4 years ago

dmitry-kovalev commented 4 years ago

If where's no b2 installed on a machine with GitLab, script crashes with

./auto-gitlab-backup.sh: line 472: b2: command not found
./auto-gitlab-backup.sh: line 473: b2: command not found

because of this temp commit https://github.com/sund/auto-gitlab-backup/commit/b768f2bddeb5f06bed9b41033aab291e3e36388c

sund commented 4 years ago

rather than removing things that others might use, perhaps an 'if' statement would be better?

dmitry-kovalev commented 4 years ago

Yes, it might be better that way. I was confused by the comment ## temp on this fix https://github.com/sund/auto-gitlab-backup/commit/b768f2bddeb5f06bed9b41033aab291e3e36388c#diff-fb66d2ff22d46cec9e52eae7035f05a9R471. I will rewrite my code.