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

[WPB-4379] Rabbitmq backup and restore process #712

Merged
merged 7 commits into from
Jun 25, 2024
Merged

Conversation

amitsagtani97
Copy link
Contributor

@amitsagtani97 amitsagtani97 commented Jun 18, 2024

Create backup and restore process for ansible based RabbitMQ deployment outside Kubernetes cluster - https://wearezeta.atlassian.net/browse/WPB-4379

  • Backup Process
  • Restore Process

```
rabbitmqadmin import definitions.json
```
To restore the data -
Copy link
Contributor

@lwille lwille Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: node needs to be stopped before restoring files
suggestion: ensure rabbitmq node is stopped before and restarted after restoring the mnesia directory.

offline/rabbitmq_backup_restore.md Outdated Show resolved Hide resolved
offline/rabbitmq_backup_restore.md Outdated Show resolved Hide resolved
offline/rabbitmq_backup_restore.md Outdated Show resolved Hide resolved
offline/rabbitmq_backup_restore.md Outdated Show resolved Hide resolved
Comment on lines 21 to 29
Now, save these files on your host machine with scp command -
```
mkdir rabbitmq_backups
cd rabbitmq_backups
```
Fetch the backup files for each node one by one,
```
scp -r <node_name>:<path_to_store_backup>/ <node_name>/
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this not be part of the playbook as well? I know you have node_name as the scp target folder, but it's not created prior to the command, which might end up overwriting backups between nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scp -r command will create the directories, also just to avoid the overwriting, updated docs to use new path for restore, instead of /path/to/backup

```


## Restore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the restoration process, I'd honestly link the official documentation as there's several potential pitfalls (such as shutting down the node highlighted by @lwille).

Perhaps it would be a good idea to add a few points on how the cluster is expected to behave with definitions and message restores.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added official docs link.

Copy link

Copy link
Contributor

@lwille lwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the straightforward implementation and reasonably well-documented restore steps. I have nothing to add except this Seal of Approval xD

seal of approval

@amitsagtani97 amitsagtani97 merged commit f04b6eb into master Jun 25, 2024
5 checks passed
@amitsagtani97 amitsagtani97 deleted the rabbitmq_backup branch June 25, 2024 14:31
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

Successfully merging this pull request may close these issues.

3 participants