Plan Not Being Loaded

by ADMIN 22 views

Plan Not Being Loaded: Troubleshooting MGOB with Docker

MGOB (MongoDB Backup) is a powerful tool for backing up MongoDB databases. However, when using Docker, some users may encounter issues with the plan not being loaded. In this article, we will explore the possible causes of this issue and provide step-by-step solutions to resolve it.

When running MGOB with Docker, you may experience the following symptoms:

  • The on-demand backup works, but the scheduler does not create any backups.
  • The /status endpoint returns an empty array [].
  • The /status/mongo-backup endpoint returns a "Plan not found" error.
  • The curl -X POST <ip>:8090/backup/mongo-backup command correctly triggers a backup, but the backup is not created according to the scheduler.

To troubleshoot the issue, let's first examine the Docker configuration. The volumes section is used to mount the configuration files from the host machine to the Docker container. In this case, the mongo-backup.yml file is mounted to the /config directory in the container.

volumes:
  - ./mgob-config:/config:ro
  - ./mgob-storage:/storage
  - ./mgob-tmp:/tmp
  - ./mgob-data:/data

The mongo-backup.yml file contains the configuration for the MGOB plan. The file is located in the ./mgob-config directory and is mounted to the /config directory in the Docker container.

scheduler:
    cron: '*/10 * * * *' 
    retention: 14
    timeout: 60
target:
    uri: 'mongodb://root:<pasw>@mongodb:27017/?authSource=admin'
s3:
    bucket: 'my-bucket'
    region: 'us-east-1'
    url: 'https://s3.amazonaws.com/'
    accessKey: <KEY>
    secretKey: <KEY>
    acl: 'private'
    api: 'S3v4'

The logs are an essential tool for troubleshooting the issue. By examining the logs, we can see that the MGOB container is starting with the correct configuration, but there is no message indicating that the config has been loaded.

time="2025-04-25T18:43:04Z" level=info msg="mgob 2.0.28"
time="2025-04-25T18:43:04Z" level=info msg="starting with config: &{LogLevel:info JSONLog:false Host: Port:8090 ConfigPath:/config StoragePath:/storage TmpPath:/tmp DataPath:/data Version:2.0.28 UseAwsCli:false HasGpg:false}"
...

Based on the symptoms and the logs, we can try the following troubleshooting steps:

  1. Check the config file: Verify that the mongo-backup.yml file is correctly formatted and contains the necessary configuration options.
  2. Check the Docker configuration: Ensure that the volumes section is correctly configured and that the mongo-backup.yml file is mounted to the /config directory in the container.
  3. Check the logs: Examine the logs to see if there are any error messages indicating that the config has not been loaded.
  4. Try a different config file: Create a new mongo-backup.yml file with a different configuration and try running the MGOB container again.
  5. Check the scheduler: Verify that the scheduler is correctly configured and that the cron expression is set to the desired interval.

In this article, we explored the possible causes of the "Plan not being loaded" issue when using MGOB with Docker. By examining the Docker configuration, config file, and logs, we can try the troubleshooting steps outlined above to resolve the issue. If the issue persists, it may be necessary to seek further assistance from the MGOB community or the Docker support team.
Plan Not Being Loaded: Troubleshooting MGOB with Docker - Q&A

In our previous article, we explored the possible causes of the "Plan not being loaded" issue when using MGOB with Docker. In this article, we will provide a Q&A section to help you troubleshoot and resolve this issue.

Q: What are the common causes of the "Plan not being loaded" issue?

A: The common causes of the "Plan not being loaded" issue include:

  • Incorrect configuration of the mongo-backup.yml file
  • Incorrect Docker configuration
  • Missing or incorrect configuration options in the mongo-backup.yml file
  • Issues with the scheduler configuration

Q: How do I check the config file?

A: To check the config file, follow these steps:

  1. Verify that the mongo-backup.yml file is correctly formatted and contains the necessary configuration options.
  2. Check the file for any syntax errors or missing configuration options.
  3. Ensure that the file is correctly mounted to the /config directory in the Docker container.

Q: How do I check the Docker configuration?

A: To check the Docker configuration, follow these steps:

  1. Verify that the volumes section is correctly configured and that the mongo-backup.yml file is mounted to the /config directory in the container.
  2. Check the Docker logs for any error messages indicating issues with the configuration.
  3. Ensure that the Docker container is running with the correct configuration.

Q: How do I check the logs?

A: To check the logs, follow these steps:

  1. Examine the logs to see if there are any error messages indicating that the config has not been loaded.
  2. Check the logs for any messages indicating issues with the scheduler configuration.
  3. Ensure that the logs are correctly configured to display the necessary information.

Q: How do I try a different config file?

A: To try a different config file, follow these steps:

  1. Create a new mongo-backup.yml file with a different configuration.
  2. Update the Docker configuration to use the new config file.
  3. Run the MGOB container again to see if the issue is resolved.

Q: How do I check the scheduler?

A: To check the scheduler, follow these steps:

  1. Verify that the scheduler is correctly configured and that the cron expression is set to the desired interval.
  2. Check the scheduler logs for any error messages indicating issues with the configuration.
  3. Ensure that the scheduler is running with the correct configuration.

Q: What are the next steps if the issue persists?

A: If the issue persists, it may be necessary to seek further assistance from the MGOB community or the Docker support team. You can also try:

  • Checking the MGOB documentation for any updates or changes to the configuration.
  • Searching online forums and communities for similar issues and solutions.
  • Reaching out to the MGOB support team for further assistance.

In this article, we provided a Q&A section to help you troubleshoot and resolve the "Plan not being loaded" issue when using MGOB with Docker. By following the steps outlined above, you should be able to identify and resolve the issue. If the issue persists, it may be necessary to seek further assistance from the MGOB community or the Docker support team.