docker-openldap icon indicating copy to clipboard operation
docker-openldap copied to clipboard

S3 Backups Broken

Open patrickstump opened this issue 3 years ago • 8 comments

There are several issues with trying to use S3 Backups.

Environment

Using the docker-compose file provided

Issues

Setting Backups to S3

In order to set the backups to S3, the env variable BACKUP_TYPE needs to be set to S3, not BACKUP_LOCATION. This can be seen at /etc/services.available/20-openldap-backup/run line 17

S3 Environment variables are incorrect

  1. The S3 variable do not want BACKUP_ in front of them, as can be seen at starting at [/etc/services.available/20-openldap-backup/run line 128] (https://github.com/tiredofit/docker-openldap/blob/1fd264d7caf8a136ece9dcf4ea50c6cf884257ec/install/etc/services.available/20-openldap-backup/run#L128)
  2. The S3_HOSTNAME is not correct, the script wants S3_HOST

Missing libressl

Don't know if it is related or not

++ libressl md5 -binary
/etc/services.available/20-openldap-backup/run: line 149: libressl: command not found

patrickstump avatar Mar 15 '21 22:03 patrickstump

Thanks for this, will review and push out a fix.

tiredofit avatar Mar 15 '21 22:03 tiredofit

Just looking at this in detail: - My apologies, I copied this from by tiredofit/db-backup image and didn't do proper QA.

  • Setting Backup Type to S3 (line 17) I am not following: My line is: if [ "$BACKUP_TYPE" = "S3" ] || [ "$BACKUP_TYPE" = "s3" ] || [ "$BACKUP_TYPE" = "MINIO" ] || [ "$BACKUP_TYPE" = "minio" ] ; then

Which doesn't anywhere state BACKUP_LOCATION - Can I Get clarity?

  • S3 Variables are not correct - Again that is a BACKUP_TYPE Situation (You would set variable BACKUP_TYPE=S3) to activate.

  • Correct on the S3_HOSTNAME - I've updated the documentation to state S3_HOST on the next commit.

  • LibreSSL issue- Nice catch. We're using openssl from this image, and again I have to apologize for not doing proper QA on the S3 component, the next push will contain this fix.

tiredofit avatar Mar 16 '21 00:03 tiredofit

Initial Change pushed as tiredofit/openldap:7.1.11

tiredofit avatar Mar 16 '21 00:03 tiredofit

Yeah sorry if the comment about BACKUP_LOCATION didn't make sense... end of the day and I was a bit tired.

In the Environment Variables section of the read me, it says that BACKUP_LOCATION specifies either filesystem or or s3. I was attempting to say that the code was looking for BACKUP_TYPE and not using BACKUP_LOCATION.

patrickstump avatar Mar 16 '21 13:03 patrickstump

We're using your image openldap-fusiondirectory, can you trigger a build so it comes through on that one?

patrickstump avatar Mar 16 '21 13:03 patrickstump

Sure, I've just rebuilt it (:latest).

tiredofit avatar Mar 16 '21 15:03 tiredofit

sorry. i'm use to closing issues at my work :)...

You probably meant for it to be this way but /usr/loca/bin/backup-now is not executable. you have to bash ./backup-now. just an fyi

patrickstump avatar Mar 16 '21 16:03 patrickstump

Darnit, thats my permissiosn on my workstation that got reset after a rebuild. Apologies on being very messy. I will resolve shortly.

tiredofit avatar Mar 16 '21 16:03 tiredofit