Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utilizing S3 storage into backup container #121

Closed
rshourou opened this issue Feb 6, 2024 · 5 comments
Closed

utilizing S3 storage into backup container #121

rshourou opened this issue Feb 6, 2024 · 5 comments

Comments

@rshourou
Copy link

rshourou commented Feb 6, 2024

Looking for a backup-deploy.yaml file which includes environment variables for s3 storage (e.g. S3_USER , S3_PASSWORD, S3_ENDPOINT, S3_BUCKET). Couldn't find any documentation with this regard. I want to know how to connect s3 storage to backup container in openshift.

@WadeBarnes
Copy link
Member

WadeBarnes commented Feb 6, 2024

Support for S3 storage was added in this PR; https://github.com/BCDevOps/backup-container/pull/113/files. All documentation associated to the feature was included in that PR (currently). That did not include an updated backup-deploy.yaml, though there should be enough documentation to indicate what updates would be needed to the/a backup-deploy.yaml. If you need additional assistance I would reach out to @jleach through this ticket.

In the end it would be nice to have an updated backup-deploy.yaml submitted to the project for cases such as yours.

@rshourou
Copy link
Author

rshourou commented Feb 6, 2024

hi @jleach
I read all documentation associated to utilizing S3 storage, but there is not enough guidance on where and how to integrate s3 variables into backup-deploy.yaml. Can you please assist me with this regard. Do S3 storage variables need to be added into volumes.spec in DeploymentConfig section in backup-deploy.yaml file?

@jleach
Copy link
Member

jleach commented Feb 6, 2024

Hi @rshourou Recalling from memory here but I think you just set these environment variables (these are from the docker-compose.yaml file):

S3_USER: minio
S3_PASSWORD: secret00
S3_ENDPOINT: http://minio:9000
S3_BUCKET: backups

Then when it starts you should see this is the logs. Notice the "S3 endpoint" line.

backup-1      | - FTP server: not configured
backup-1      | - S3 endpoint: http://minio:9000
backup-1      | - Webhook Endpoint: not configured
backup-1      | - Environment Friendly Name: not configured
backup-1      | - Environment Name (Id): not configured

Finally, you just have these two lines in your config/backup.conf to schedule the backup:

0 1 * * * default ./backup.sh -s
0 4 * * * default ./backup.sh -s -v all

@rshourou
Copy link
Author

rshourou commented Feb 6, 2024

I set the abovementioned env variables in backup-deploy.yaml and ran backup.sh -1 in backup pod and got this error:

image

@jleach
Copy link
Member

jleach commented Feb 6, 2024

Able to check the env vars are set? Open a terminal to the backup pod and echo all of them like echo $S3_USER. Make sure none of them are empty. That's to see about the error in red. The messages in yellow "Unable to make bucket" see like they come from the server and maybe caused by a file system permission issue in minio.

You can see what it's trying to do in this file

@rshourou rshourou closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants