Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backup_and_restore/backing-up-acs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Doing this ensures the availability and integrity of essential data, allowing yo
When the {product-title-short} installation gets accidentally deleted, or you need to migrate it to another cluster or namespace, having a backup of the deployment configurations enables a seamless recovery process.
In addition, by restoring the custom settings from the backup, you can efficiently reinstate your Central installation's unique requirements and configurations, ensuring consistent and exact deployment of the system.

//Back up considerations for external databases and cloud users
include::modules/backup-considerations-for-external-databases-and-cloud-users.adoc[leveloffset=+1]

//Backing up your PostgreSQL database and certificates
include::modules/backing-up-your-postgresql-database-and-certificates.adoc[leveloffset=+2]

Because backup files include secrets and certificates, you must securely store the backup files.

[id="backing-up-central-db-roxctl"]
Expand Down
22 changes: 18 additions & 4 deletions backup_and_restore/restore-acs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@ include::modules/common-attributes.adoc[]
toc::[]

[role="_abstract"]
You can restore {product-title} from an existing backup by using the `roxctl` command-line interface (CLI).
You can restore {rh-rhacs-first} from an existing backup by using the `roxctl` command-line interface (CLI).

Depending upon your requirements and the data you have backed up, you can restore from the following types of backups:

. *Restore Central database from the Central database backup*: Use this to recover from a database failure or data corruption event.
It allows you to restore and recover the Central database to its earlier functional state.
. *Restore an external PostgreSQL database*: Use this to restore your {product-title-short} instance when you use an external PostgreSQL database. You can recover your system data while maintaining your existing database setup.

. *Restore the Central certificates and redeploy Central*: Use this to restore the Central certificates and redeploy Central after a database restoration. This ensures that authentication certificates for secured clusters and API tokens remain valid.

. *Restore Central database from the Central database backup*: Use this to recover from a database failure or data corruption event. You can restore and recover the Central database to its earlier functional state.

. *Restore Central from the Central deployment backup*: Use this if you are migrating Central to another cluster or namespace. This option restores the configurations of your Central installation.

//Restoring an external PostgreSQL database
include::modules/restoring-an-external-postgresql-database.adoc[leveloffset=+1]

//Restoring the Central certificates and redeploying Central
include::modules/restoring-central-certificates-and-redeploying-central.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources
* xref:../backup_and_restore/restore-acs.adoc#restore-cert-roxctl_restore-acs[Restore certificates using the roxctl CLI]

[id="restore-central-db-roxctl"]
== Restoring Central database by using the roxctl CLI
You can use the `roxctl` CLI to restore {product-title} by using the `restore` command. You require an API token or your administrator password to run this command.
Expand Down Expand Up @@ -56,4 +70,4 @@ The following list provides a high-level overview of installation steps:
** xref:../backup_and_restore/restore-acs.adoc#restore-deployment-config-operator_restore-acs[Restore Central deployment using the {product-title-short} Operator]
** xref:../backup_and_restore/restore-acs.adoc#restore-deployment-config-helm_restore-acs[Restore Central deployment using Helm]
. Restore Central database by following the instruction in the xref:../backup_and_restore/restore-acs.adoc#restore-central-db-roxctl[Restoring Central database by using the roxctl CLI] topic.
. If you have an external DNS entry pointing to your old {product-title-short} Central instance, you must reconfigure it to point to the new {product-title-short} Central instance that you create.
. If you have an external DNS entry pointing to your old {product-title-short} Central instance, you must reconfigure it to point to the new {product-title-short} Central instance that you create.
31 changes: 31 additions & 0 deletions modules/backing-up-your-postgresql-database-and-certificates.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Module included in the following assemblies:
//
// * backup_and_restore/backing-up-acs.adoc

:_mod-docs-content-type: PROCEDURE
[id="backing-up-your-postgresql-database-and-certificates_{context}"]
= Backing up your PostgreSQL database and certificates

By backing up your {rh-rhacs-first} instance with an external PostgreSQL database, you can ensure the security and integrity of your data by following a vendor-recommended procedure. In this process, you back up the PostgreSQL database first, and then back up the {product-title-short} certificates.

.Procedure

. To back up the PostgreSQL database, run the following command:
+
[source,terminal]
----
$ pg_dump -U <username> -d <database_name> -f <output_file_path>
----
+
where:

`<username>`:: Specifies the name of the user who has the necessary permissions to perform the dump.
`<database_name>`:: Specifies the actual name of the database.
`<output_file_path>`:: Specifies the desired location and name for your backup file.

. To back up the {product-title-short} certificates, run the following command:
+
[source,terminal]
----
$ roxctl central backup --certs-only=true
----
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Module included in the following assemblies:
//
// * backup_and_restore/backing-up-acs.adoc

:_mod-docs-content-type: CONCEPT
[id="backup-considerations-for-external-databases-and-cloud-users_{context}"]
= Backup considerations for external databases and cloud users

You must manage your backups differently if you use an external database or if you are a cloud user.

.Back up with an external database

If you use an external database, you cannot use the automatic backup option or start a backup process from within {rh-rhacs-first}.

[IMPORTANT]
====
* When you upgrade your external database, you must scale down Central before you start the backup. Central attempts to connect to the database until it is successful, which can cause issues during the upgrade process.

* For a database that you manage, you must use the backup procedures that your database vendor recommends.
====

.Back up for cloud users

If you are a cloud user, you cannot use the automatic backup option or start the backup process from an integration. Red{nbsp}Hat is responsible for backing up your data.
32 changes: 32 additions & 0 deletions modules/restoring-an-external-postgresql-database.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Module included in the following assemblies:
//
// * backup_and_restore/restore-acs.adoc

:_mod-docs-content-type: PROCEDURE
[id="restoring-an-external-postgresql-database_{context}"]
= Restoring an external PostgreSQL database

By restoring an external PostgreSQL database, you can recover your {rh-rhacs-first} instance from a backup while maintaining your existing database setup.

This procedure focuses on restoring the database that contains your {product-title-short} system data. You can perform a PostgreSQL database restore by using the vendor-recommended `pg_restore` command.

.Prerequisites

* You have scaled down Central to `0`.

.Procedure

. To perform a PostgreSQL restore, run the following command:
+
[source,terminal]
----
$ pg_restore -U <username> -d <database_name> <path_to_backup_file>
----
+
where:

`<username>`:: Specifies the actual user name.
`<database_name>`:: Specifies the name of the target database.
`<path_to_backup_file>`:: Specifies the location and name of the file you want to restore. You can use `.tar`, `.gz`, or another custom file format.

After you restore the external PostgreSQL database, you must restore the {product-title-short} Central certificates.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Module included in the following assemblies:
//
// * backup_and_restore/restore-acs.adoc

:_mod-docs-content-type: PROCEDURE
[id="restoring-central-certificates-and-redeploying-central_{context}"]
= Restoring the Central certificates and redeploying Central

You must restore the Central certificates and redeploy Central to ensure that authentication certificates for secured clusters and API tokens remain valid for the redeployed Central instance.

.Procedure

* Run the `roxctl central generate interactive` command and provide the path to your backup file, which creates a central-bundle folder with the necessary manifests and scripts.
+
You can then use these files to install Central, ensuring that all your authentication certificates and API tokens remain valid.
+
For more information, see "Restore certificates using the roxctl CLI".