Skip to content
Open
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
5 changes: 2 additions & 3 deletions guides/common/assembly_backing-up-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ ifdef::katello,orcharhino,satellite[]
include::modules/proc_performing-an-offline-backup-without-pulp-content.adoc[leveloffset=+1]
endif::[]

ifndef::containerized[]
include::modules/proc_performing-an-incremental-backup.adoc[leveloffset=+1]
endif::[]

ifdef::containerized[]
include::modules/ref_example-of-a-weekly-full-backup.adoc[leveloffset=+1]
endif::[]
ifndef::containerized[]

include::modules/ref_example-of-a-weekly-full-backup-followed-by-daily-incremental-backups.adoc[leveloffset=+1]

ifndef::containerized[]
include::modules/proc_performing-an-online-backup.adoc[leveloffset=+1]

include::modules/proc_creating-a-conventional-backup.adoc[leveloffset=+1]
Expand Down
2 changes: 1 addition & 1 deletion guides/common/assembly_restoring-project-from-backup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ 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]

ifndef::containerized[]
include::modules/proc_restoring-smart-proxy-server-by-using-a-virtual-machine-snapshot.adoc[leveloffset=+1]
endif::[]
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ifdef::containerized[]
[options="nowrap", subs="+quotes,attributes"]
----
# du -sh /var/lib/foremanctl
10MB /var/lib/pulp
10MB /var/lib/foremanctl
----
endif::[]
ifndef::containerized[]
Expand Down
33 changes: 33 additions & 0 deletions guides/common/modules/proc_performing-an-incremental-backup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ endif::[]
.Procedure
. Perform a full offline backup.
For more information, see xref:performing-a-full-offline-backup[].
ifndef::containerized[]
. Create a directory within your backup directory to store the first incremental backup:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
Expand All @@ -39,3 +40,35 @@ For example, if you want to make a new incremental backup from the full backup r
----
# {foreman-maintain} backup offline --incremental _/var/backup_directory/full_backup_ _/var/backup_directory_
----
endif::[]
ifdef::containerized[]
. Create the first incremental backup by specifying the full backup directory as the base:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foremanctl} backup _/var/backup_ --base-backup _/var/backup/full_backup_
----
+
This creates a new backup directory containing only files changed since the full backup.
. Create the second incremental backup by specifying the first incremental backup as the base:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foremanctl} backup _/var/backup_ --base-backup _/var/backup/first_incremental_backup_
----
+
This creates a directory for the second incremental backup in your backup directory.
+
[NOTE]
====
You can point to a different version of the backup, and make a series of increments with that version of the backup as the starting point.
For example, if you want to make a new incremental backup from the full backup rather than the first or second incremental backup, point to the full backup directory:

[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foremanctl} backup _/var/backup_ --base-backup _/var/backup/full_backup_
----

You can chain incremental backups, but all backups in the chain are required for restore.
====
endif::[]
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,32 @@ ifndef::foreman-deb[]
endif::[]

.Procedure
. Restore the last full backup using the instructions in xref:Restoring_from_a_Full_Backup_{context}[].
. Restore the last full backup by following the instructions in xref:Restoring_from_a_Full_Backup_{context}[].
ifndef::containerized[]
. Remove the full backup data from the local file system on {ProjectServer}, for example, `/var/` or `/var/tmp/`.
. Copy the incremental backup data to the local file system on {ProjectServer}, for example, `/var/` or `/var/tmp/`.
endif::[]
ifdef::containerized[]
. Copy the incremental backup data to the local file system on {ProjectServer}.
endif::[]
. Restore the incremental backups in the same sequence that they are made:
+
ifndef::containerized[]
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foreman-maintain} restore _/var/backup_directory_/FIRST_INCREMENTAL
# {foreman-maintain} restore _/var/backup_directory_/SECOND_INCREMENTAL
----
endif::[]
ifdef::containerized[]
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# {foremanctl} restore _/var/backup/first_incremental_backup_ --force
# {foremanctl} restore _/var/backup/second_incremental_backup_ --force
----
+
The `--force` flag is required for subsequent restores because the system is already deployed.
endif::[]

.Next steps
* If you create a new instance of {ProjectServer} or {SmartProxyServer}, decommission the old instance after restoring the backup.
Expand Down
9 changes: 9 additions & 0 deletions guides/common/modules/ref_available-backup-methods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ For more details, read help information for the offline backup:
----
endif::[]

Incremental backup::
Incremental backups are offline backups that capture only files that have changed since a previous backup.
They require less time and storage than a full offline backup.
ifdef::containerized[]
+
The backup process creates snapshot files that track changes, allowing you to chain incremental backups.
All backups in the chain are required for restore.
endif::[]

ifndef::containerized[]
Online backup::
Only {Project} services that affect the consistency of the backup, including all background workers, are shut down while the backup process is running.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESTINATION=/var/backup_directory
if [[ $(date +%w) == 0 ]]; then
{foremanctl} backup $DESTINATION
Comment thread
aneta-petrova marked this conversation as resolved.
ls -td -- $DESTINATION/*/ | head -n 1 > $DESTINATION/.last_full_backup
else
{foremanctl} backup $DESTINATION --base-backup "$(cat
$DESTINATION/.last_full_backup)"
fi
else
{foremanctl} backup $DESTINATION
LAST=$(ls -td -- $DESTINATION/*/ | head -n 1)
{foremanctl} backup $DESTINATION --base-backup "$LAST"
fi
exit 0
----
Expand All @@ -40,7 +46,6 @@ endif::[]

ifdef::containerized[]
Note that the `{foremanctl} backup` command requires `/sbin` and `/usr/sbin` directories to be in `PATH`.
Incremental backup is not available.
endif::[]
ifndef::containerized[]
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.
Expand Down