-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for backup and restore using docker #521
Conversation
I still need to go through the README.md and DEPLOYMENT.md to avoid overlap with /doc folder. |
- move old deployemnet and administration steps to legacy doc - split tasks into several manuals (deployment, backup, development, etc.) - update README file
|
||
Replace `/path/to/backup_script.sh` with the actual path to backup_script. | ||
|
||
### Restore Legacy Backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moustaphacheikh here we can include steps to update in settings.py file when restoring legacy backup
ENABLE_BACKUPS=true docker compose up -d backup | ||
``` | ||
|
||
This will configure automatic backups based on the `BACKUP_SCHEDULE`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BACKUP_SCHEDULE is nowhere to be found
To ensure automatic backups are enabled, set `ENABLE_BACKUPS=true` (enabled by default): | ||
|
||
```bash | ||
ENABLE_BACKUPS=true docker compose up -d backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a user already deployed the tool (docker compose up -d
) this container is already running so starting it again is not needed.
Also, what is the purpose of having backup
container running if we have already scripts/backup_script.sh
being managed by OS level crontab
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or are there like 3 ways to run backup?
a) manually by backup_script.sh
b) automatic - call backup_script.sh by cron
c) automatic - backup
container running it from withing the container based on some schedule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENABLE_BACKUPS: This was part of a work-in-progress documentation. It was initially used when we had cron jobs running inside the container, but it's no longer in use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need the backup
container to have the necessary libraries to do the db backups. the VM does not have the database.
#!/bin/bash | ||
|
||
# Stop services that should not run during the backup | ||
docker compose stop nginx flower worker beat web mq solr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to stop all the services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to prevent any changes to the data while the backup is being created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The backup was running fine so far with the service running. Not that a short downtime is an issue.
We can discuss this with @neoflex :)
No description provided.