8.7. Performing a Snapshot Backup

You can perform a snapshot backup that uses Logical Volume Manager (LVM) snapshots of the Pulp, MongoDB, and PostgreSQL directories. Creating a backup from LVM snapshots mitigates the risk of an inconsistent backup.

The snapshot backup method is faster than a full offline backup and therefore reduces Satellite downtime.

To view the usage statement, enter the following command:

satellite-maintain backup snapshot -h
警告

Request other Satellite Server or Capsule Server users to save any changes and warn them that Satellite services are unavailable for the duration of the backup. Ensure no other tasks are scheduled for the same time as the backup.

Prerequisites

Before you perform the snapshot backup, ensure that the following conditions are met:

  • The system uses LVM for the directories that you snapshot: /var/lib/pulp/, /var/lib/mongodb/, and /var/lib/pgsql/.
  • The free disk space in the relevant volume group (VG) is three times the size of the snapshot. More precisely, the VG must have enough space unreserved by the member logical volumes (LVs) to accommodate new snapshots. In addition, one of the LVs must have enough free space for the backup directory.
  • The target backup directory is on a different LV than the directories that you snapshot.

Procedure

  • To perform a snapshot backup, enter the satellite-maintain backup snapshot command:

    # satellite-maintain backup snapshot /var/backup_directory

The satellite-maintain backup snapshot command creates snapshots when the services are active, and stops all services which can impact the backup. This makes the maintenance window shorter. After the successful snapshot, all services are restarted and LVM snapshots are removed.