From 04a382eca96dcf01e32cadb8564424a356aa6d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aneta=20=C5=A0teflov=C3=A1=20Petrov=C3=A1?= Date: Mon, 18 May 2026 12:19:51 +0200 Subject: [PATCH] Update offline backup for foremanctl --- ...on_directories-created-during-backups.adoc | 20 +++++++++++++++---- .../proc_performing-a-full-backup.adoc | 16 +++++++++++++++ .../modules/ref_available-backup-methods.adoc | 5 +++++ ...followed-by-daily-incremental-backups.adoc | 5 ++++- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/guides/common/modules/con_directories-created-during-backups.adoc b/guides/common/modules/con_directories-created-during-backups.adoc index 91da97d9cb3..8a8197377d1 100644 --- a/guides/common/modules/con_directories-created-during-backups.adoc +++ b/guides/common/modules/con_directories-created-during-backups.adoc @@ -6,11 +6,23 @@ [role="_abstract"] {Project} organizes backups in time-stamped subdirectories, which helps you identify and select the correct backup when restoring your system. -The `{foreman-maintain} backup` command creates a time-stamped subdirectory in the backup directory that you specify. -The `{foreman-maintain} backup` command does not overwrite backups, therefore you must select the correct directory or subdirectory when restoring from a backup or an incremental backup. -The `{foreman-maintain} backup` command stops and restarts services as required. +The +ifdef::containerized[`foremanctl backup`] +ifndef::containerized[`{foreman-maintain} backup`] +command creates a time-stamped subdirectory in the backup directory that you specify. +The +ifdef::containerized[`foremanctl backup`] +ifndef::containerized[`{foreman-maintain} backup`] +command does not overwrite backups, therefore you must select the correct directory or subdirectory when restoring from a backup or an incremental backup. +The +ifdef::containerized[`foremanctl backup`] +ifndef::containerized[`{foreman-maintain} backup`] +command stops and restarts services as required. -When you run the `{foreman-maintain} backup offline` command, the following default backup directories are created: +When you run the +ifdef::containerized[`foremanctl backup offline`] +ifndef::containerized[`{foreman-maintain} backup offline`] +command, the following default backup directories are created: * `{project-context}-backup` on {Project} * `foreman-proxy-backup` on {SmartProxy} diff --git a/guides/common/modules/proc_performing-a-full-backup.adoc b/guides/common/modules/proc_performing-a-full-backup.adoc index b49782f6369..6b4e9de5150 100644 --- a/guides/common/modules/proc_performing-a-full-backup.adoc +++ b/guides/common/modules/proc_performing-a-full-backup.adoc @@ -27,13 +27,29 @@ Ensure no other tasks are scheduled for the same time as the backup. .Procedure . Back up your {ProjectServer}: + +ifdef::containerized[] +[options="nowrap", subs="+quotes,verbatim,attributes"] +---- +# foremanctl backup offline _/var/{project-context}-backup_ +---- +endif::[] +ifndef::containerized[] [options="nowrap", subs="+quotes,verbatim,attributes"] ---- # {foreman-maintain} backup offline _/var/{project-context}-backup_ ---- +endif::[] . Back up your {SmartProxyServer}: + +ifdef::containerized[] +[options="nowrap", subs="+quotes,verbatim,attributes"] +---- +# foremanctl backup offline _/var/foreman-proxy-backup_ +---- +endif::[] +ifndef::containerized[] [options="nowrap", subs="+quotes,verbatim,attributes"] ---- # {foreman-maintain} backup offline _/var/foreman-proxy-backup_ ---- +endif::[] diff --git a/guides/common/modules/ref_available-backup-methods.adoc b/guides/common/modules/ref_available-backup-methods.adoc index c67ad4c282b..42a092d97e4 100644 --- a/guides/common/modules/ref_available-backup-methods.adoc +++ b/guides/common/modules/ref_available-backup-methods.adoc @@ -13,7 +13,12 @@ For more details, read help information for the offline backup: + [options="nowrap", subs="+quotes,verbatim,attributes"] ---- +ifdef::containerized[] +# foremanctl backup offline --help +endif::[] +ifndef::containerized[] # {foreman-maintain} backup offline --help +endif::[] ---- Online backup:: diff --git a/guides/common/modules/ref_example-of-a-weekly-full-backup-followed-by-daily-incremental-backups.adoc b/guides/common/modules/ref_example-of-a-weekly-full-backup-followed-by-daily-incremental-backups.adoc index 1096af4afe2..5c8413b50f2 100644 --- a/guides/common/modules/ref_example-of-a-weekly-full-backup-followed-by-daily-incremental-backups.adoc +++ b/guides/common/modules/ref_example-of-a-weekly-full-backup-followed-by-daily-incremental-backups.adoc @@ -22,4 +22,7 @@ fi exit 0 ---- -Note that the `{foreman-maintain} backup` command requires `/sbin` and `/usr/sbin` directories to be in `PATH` and the `--assumeyes` option is used to skip the confirmation prompt. +Note that the +ifdef::containerized[`foremanctl backup`] +ifndef::containerized[`{foreman-maintain} backup`] +command requires `/sbin` and `/usr/sbin` directories to be in `PATH` and the `--assumeyes` option is used to skip the confirmation prompt.