-
Notifications
You must be signed in to change notification settings - Fork 112
Update restore docs for foremanctl #4997
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
base: master
Are you sure you want to change the base?
Changes from all commits
8bfaa29
d0a263e
2176670
1e0aa2a
9cfa66d
b61a49b
25be4c2
24ae0c0
e871ddb
868e41d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| include::modules/con_restoring-server-or-smart-proxy-from-a-backup.adoc[] | ||
| include::modules/con_restoring-project-from-backup.adoc[] | ||
|
|
||
| include::modules/proc_restoring-from-a-full-backup.adoc[leveloffset=+1] | ||
|
|
||
| ifndef::containerized[] | ||
| include::modules/proc_restoring-from-incremental-backups.adoc[leveloffset=+1] | ||
|
|
||
| include::modules/proc_restoring-smartproxyserver-by-using-a-virtual-machine-snapshot.adoc[leveloffset=+1] | ||
| endif::[] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,14 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
|
|
||
| [id="restoring-{project-context}-server-or-{smart-proxy-context}-from-a-backup_{context}"] | ||
| = Restoring {ProjectServer} or {SmartProxyServer} from a backup | ||
| [id="restoring-{project-context}-from-backup"] | ||
| = Restoring {Project} from backup | ||
|
|
||
| [role="_abstract"] | ||
| ifdef::containerized[] | ||
| You can restore your {ProjectServer} from a backup to recover after failure or data loss. | ||
| endif::[] | ||
| ifndef::containerized[] | ||
| You can restore {ProjectServer} or {SmartProxyServer} from a backup to recover after failure or data loss. | ||
| endif::[] | ||
| This process outlines how to restore the backup on the same server that generated the backup, and all data covered by the backup is deleted on the target system. | ||
| If the original system is unavailable, provision a system with the same configuration settings and host name. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,18 +4,39 @@ | |||||
| = Restoring from a full backup | ||||||
|
|
||||||
| [role="_abstract"] | ||||||
| Restore {ProjectServer} or {SmartProxyServer} from a full backup return the system to the state at the time of the backup. | ||||||
| ifdef::containerized[] | ||||||
|
Check failure on line 7 in guides/common/modules/proc_restoring-from-a-full-backup.adoc
|
||||||
| Restore your {ProjectServer} from a full backup to return the system to the state at the time of the backup. | ||||||
| endif::[] | ||||||
| ifndef::containerized[] | ||||||
| Restore {ProjectServer} or {SmartProxyServer} from a full backup to return the system to the state at the time of the backup. | ||||||
| endif::[] | ||||||
| When the restore process completes, all processes are online, and all databases and system configuration revert to the state at the time of the backup. | ||||||
|
|
||||||
| ifdef::containerized[] | ||||||
| The restore process can take a long time to complete. | ||||||
| The restoration script deployed by the `{foremanctl} restore` command includes the following actions: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. non-blocking: Can we make this shorter:
Suggested change
|
||||||
|
|
||||||
| * Validation checks to verify the backup integrity, disk space, and system requirements | ||||||
| * Restoring databases, Pulp content, encryption keys, OAuth secrets, and passwords | ||||||
| * Configuring and starting of services by using `{foremanctl} deploy` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the odd one out because it explains how it's done, compared to line 19/20/22 which just state what is done, not how. Your call:
Suggested change
|
||||||
| * Confirming that services are running as expected | ||||||
| endif::[] | ||||||
|
|
||||||
| .Prerequisites | ||||||
| * Your {ProjectServer} must have the same host name, configuration, and be the same minor version (X.Y) as the original system. | ||||||
| * The target directory must exist and be writable. | ||||||
| The target directory is read from the configuration files contained within the backup archive. | ||||||
| ifndef::foreman-deb[] | ||||||
| * If the backed up system had FIPS enabled, the system on which you are restoring must also have FIPS enabled. | ||||||
| endif::[] | ||||||
| ifdef::containerized[] | ||||||
| * Your system must have enough space to extract the backup data. | ||||||
| Your system must also have enough space left for the backup data after the restoration. | ||||||
| For more information, see xref:estimating-the-size-of-a-backup[]. | ||||||
| endif::[] | ||||||
|
|
||||||
| .Procedure | ||||||
| ifndef::containerized[] | ||||||
| . Ensure that you have enough space to store the backup data on the base system of {ProjectServer} or {SmartProxyServer} as well as enough space after the restoration to contain all the data in the `/etc/` and `/var/` directories contained within the backup. | ||||||
| + | ||||||
| To check the space used by a directory: | ||||||
|
|
@@ -33,6 +54,7 @@ | |||||
| ---- | ||||||
| + | ||||||
| Add the ``--total`` option to get a total of the results from more than one directory. | ||||||
| endif::[] | ||||||
| ifndef::foreman-deb[] | ||||||
| . Restore the correct SELinux contexts: | ||||||
| + | ||||||
|
|
@@ -41,6 +63,11 @@ | |||||
| # restorecon -Rv / | ||||||
| ---- | ||||||
| endif::[] | ||||||
| ifdef::containerized[] | ||||||
| . Install {ProjectServer} on the system where you want to restore the backup. | ||||||
| For more information, see {InstallingServerDocURL}[{InstallingServerDocTitle}]. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this link OK to be part of the procedure? |
||||||
| endif::[] | ||||||
| ifndef::containerized[] | ||||||
| . Choose the appropriate method to install {Project} or {SmartProxy}: | ||||||
| ** To install {ProjectServer} from a connected network, follow the procedures in {InstallingServerDocURL}[{InstallingServerDocTitle}]. | ||||||
| ifdef::satellite[] | ||||||
|
|
@@ -53,21 +80,41 @@ | |||||
| For more information, see {InstallingServerDisconnectedDocURL}installing-and-configuring-{insights-iop-id}[Installing and configuring {insights-iop}]. | ||||||
| endif::[] | ||||||
| ** To install a {SmartProxyServer}, follow the procedures in {InstallingSmartProxyDocURL}[{InstallingSmartProxyDocTitle}]. | ||||||
| endif::[] | ||||||
| . Copy the backup data to the local file system on {ProjectServer}. | ||||||
| Use `/var/` or `/var/tmp/`. | ||||||
| . Run the restoration script. | ||||||
| ifdef::containerized[] | ||||||
| . Optional: Validate the backup to ensure that all files required for the restore process exist and the backup metadata is valid: | ||||||
| + | ||||||
| [options="nowrap", subs="+quotes,verbatim,attributes"] | ||||||
| ---- | ||||||
| # {foreman-maintain} restore __/var/backup_directory__ | ||||||
| # {foremanctl} restore _/var/backup_directory_ --validate | ||||||
| ---- | ||||||
| endif::[] | ||||||
| . Run the restoration script: | ||||||
| + | ||||||
| Where _backup_directory_ is the time-stamped directory or subdirectory containing the backed-up data. | ||||||
| ifdef::containerized[] | ||||||
| [options="nowrap", subs="+quotes,verbatim,attributes"] | ||||||
| ---- | ||||||
| # {foremanctl} restore _/var/backup_directory_ --force | ||||||
|
aneta-petrova marked this conversation as resolved.
|
||||||
| ---- | ||||||
| + | ||||||
| The restore process can take a long time to complete, because of the amount of data to copy. | ||||||
| The `--force` option is required to confirm that the data from the fresh {Project} deployment installed on the system will be permanently deleted and replaced by the data from the backup. | ||||||
| endif::[] | ||||||
| ifndef::containerized[] | ||||||
| [options="nowrap", subs="+quotes,verbatim,attributes"] | ||||||
| ---- | ||||||
| # {foreman-maintain} restore __/var/backup_directory__ | ||||||
| ---- | ||||||
| endif::[] | ||||||
|
|
||||||
| .Next steps | ||||||
| ifdef::containerized[] | ||||||
| * If you create a new instance of your {ProjectServer}, decommission the old instance after restoring the backup. | ||||||
| endif::[] | ||||||
| ifndef::containerized[] | ||||||
| * If you create a new instance of {ProjectServer} or {SmartProxyServer}, decommission the old instance after restoring the backup. | ||||||
| endif::[] | ||||||
| Cloned instances are not supposed to run in parallel in a production environment. | ||||||
|
|
||||||
| .Troubleshooting | ||||||
|
|
||||||
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.
+1, the postgres data directory is mounted outside the container.