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

multi db in the same container #154

Closed
RyuunosukeDS3 opened this issue Jan 11, 2025 · 6 comments
Closed

multi db in the same container #154

RyuunosukeDS3 opened this issue Jan 11, 2025 · 6 comments
Assignees

Comments

@RyuunosukeDS3
Copy link

I'm using your solution to backup multiple databases in the same container, but it wasn't clear for me how i configure the S3 for that. I tried using envs and also configuring in the config.yaml file for each database like so:

aws_s3_endpoint: ***
aws_s3_bucket_name: ***
aws_s3_region: ***
aws_s3_access_key: ***
aws_s3_secret_key: ***

@jkaninda
Copy link
Owner

Could you let me know if you specified the config file in envs ?

    environment:
      ## Multi backup config file, configuration file
      - BACKUP_CONFIG_FILE=/backup/config.yaml

Check this: https://jkaninda.github.io/pg-bkup/how-tos/mutli-backup.html#docker-compose-file

@RyuunosukeDS3
Copy link
Author

Thanks for the quick response! Yes I did:

 env:
    - name: BACKUP_CONFIG_FILE
      value: "/backup/config.yaml"

It does backup the data it just doesn't send it to S3. The logs say it is backuping just fine.

@RyuunosukeDS3
Copy link
Author

RyuunosukeDS3 commented Jan 11, 2025

example of logs:

2025/01/11 20:00:03 INFO: Starting database backup...
2025/01/11 20:00:03 INFO: Connecting to sonarr-main-hom database ...
2025/01/11 20:00:03 INFO: Successfully connected to sonarr-main-hom database
2025/01/11 20:00:03 INFO: Backing up database...
2025/01/11 20:00:08 INFO: Database has been backed up
2025/01/11 20:00:08 INFO: Backup name is sonarr-main-hom_20250111_200003.sql.gz
2025/01/11 20:00:08 INFO: Backup size: 2.51 MiB
2025/01/11 20:00:08 INFO: Backup saved in /backup/sonarr-main-hom_20250111_200003.sql.gz
2025/01/11 20:00:08 INFO: Deleting /tmp/backup ...
2025/01/11 20:00:08 INFO: Deleting /tmp/backup ... done
2025/01/11 20:00:08 INFO: Backup completed successfully

@jkaninda
Copy link
Owner

Based on the logs. You're not using s3 as storage, nor multi db backup
Please review your configurations.

  • Make sure you've selected s3 as storage command: backup -s s3
  • Please remove the quotes around the configuration file, or you can even mount your config file as /config/config.yaml without species it in the envs

Issue: The configuration file path is not being detected when it is enclosed in quotes.

Solution: Remove the quotes around the file path to ensure it is correctly recognized.

env:
    - name: BACKUP_CONFIG_FILE
      value: /backup/config.yaml

@jkaninda jkaninda self-assigned this Jan 12, 2025
@jkaninda
Copy link
Owner

fix: the configuration file path is not being detected when it is enclosed in quotes #155

@RyuunosukeDS3
Copy link
Author

The issue resided on how i was invokingthe backup cli. After reviewing my own cronjob and the configs I was able to make it work. Thanks for your amazing work!

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

2 participants