Create standalone script to backup master node
Feature Lead: M. Anashkin
Mandatory Design Reviewers: M.Mosesohn,
Developers: M.Anashkin?
QA: A. Urlapova, Y. Kotko
Customers often ask for an official way to backup/restore the already installed Fuel Admin node.
I propose to do it with standalone script, which we make available on our web site.
Script should be able to perform the following:
1. Detect master node version and set up depending internal variables properly.
2. Ask if user want to backup or to restore master node.
3. Create backup into single tarball.
4. Restore the master node settings from given backup tarball.
5. Optional. Compress/decompress the backup tarball on the fly.
6. Optional. Create/Embed/Check md5 or sha check sum or use compression formats with built-in check sum to be sure of archive integrity.
7.Optional. Check for the necessary free space before every operation. Stop and ask the user if there is less than some free space limit left on target device.
8. Optional. Ask the user which components to backup.
9. Optional. Also backup/restore the logs or restore the log directory structure only.
10. Optional. Automatically restore master node to the previous state if restore operation failed.
One may use the following procedure as a start point:
1. Write down all non-default master node settings you might did on initial master node configuration.
2. Back up your /var/lib fuel node directory.
3. Back up your /etc/ directory.
4. Back up your /root directory.
5. Dump postgres nailgun database.
Here is the easiest way to dump database:
a) Create diagnostic snapshot from support tab in fuel.
b) Untar the snapshot.
c) Go to localhost/pg_dump in the snapshot.
d) localhost_
To restore use the following procedure:
1. Install new master node. Make the same custom settings during initial master node configuration as were on previously deployed master node. I mean these settings on red-colored prompt.
2. Restore necessary config files from /etc/ and /root.
3. Restore /var/lib
4. Restore database:
take localhost_
#!/bin/bash
sudo -u postgres psql nailgun -S -c 'drop schema public cascade; create schema public;'
sudo -u postgres psql nailgun < localhost_
Blueprint information
- Status:
- Complete
- Approver:
- Vladimir Kuklin
- Priority:
- High
- Drafter:
- Oleg S. Gelbukh
- Direction:
- Approved
- Assignee:
- Sergey Abramov
- Definition:
- Approved
- Series goal:
- Accepted for 8.0.x
- Implementation:
-
Implemented
- Milestone target:
-
8.0
- Started by
- Oleg S. Gelbukh
- Completed by
- Oleg S. Gelbukh
Related branches
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Add backup command fuel admin node command
Addressed by: https:/
add restore admin node tool
Addressed by: https:/
Add fuel admin node backup tool
Addressed by: https:/
Add fuel admin node backup tool
Addressed by: https:/
Add restore admin node tool
Addressed by: https:/
Add restore admin node tool
Addressed by: https:/
Change names of backup and restore commands according to spec
Gerrit topic: https:/
Addressed by: https:/
Change names of backup and restore commands according to spec
Addressed by: https:/
Change names of backup and restore commands according to spec
Addressed by: https:/
Remove redundant database sync action
Gerrit topic: https:/
Addressed by: https:/
Run 'puppet apply' command at host
Addressed by: https:/
Remove redundant database sync action
Addressed by: https:/
Remove redundant database sync action
Addressed by: https:/
Run 'puppet apply' command at host
Addressed by: https:/
Run 'puppet apply' command at host
Addressed by: https:/
Remove unsupported commands
Addressed by: https:/
Delete unsupported commands and helpers
Addressed by: https:/
Extract puppet modules patching into utils
Addressed by: https:/
Move puppet modules patch function to utils
Addressed by: https:/
Move puppet modules patch function to utils
Addressed by: https:/
Merge master into stable/mitaka`
Work Items
Work items:
Backup tarball: DONE
Backup mirrors: DONE
Restore configs: DONE
Restore DB: DONE
Documentation: TODO
Dependency tree

* Blueprints in grey have been implemented.