Follow

Managing SDE Backups

Use subcommands in the SD Elements Command Line Interface (SDE CLI) to manage SDE configuration files and data. These commands allow the backup and restoration of SD Elements settings and data including database encryption keys, core configurations in the YAML file, SAML certificates, and uploaded media files.

You can access the SDE CLI by creating an SSH connection to your SDE instance.

Use `sde backup --help` to view more information about using the command when logged into an SDE instance.

 

Create a backup

From the SDE CLI tool, create a backup by following the steps below:

Prerequisites:

  • Users have SDE version 4.9 or later.
  • Users have sudo access.

Steps:

  1. Use the create subcommand:

$ sde backup create

  1. The database exports before creating the backup archive.

sde> Exporting current database...

sde>

sde> Creating backup archive: /file_path/backup_file.tar.gz

sde> Backup file: backup_file.tar.gz created.

By default, the backup archive is saved to /docs/sde/backup/, and the filename has the format sde-backup-SDE.Version-YYYY-MM-DD-HHMM.

 

Restore a backup

From the SDE CLI tool, you can identify a backup archive to restore from if the version of SDE that you are using is identical to the version of SDE from which the backup was made. Restore a backup using the steps below.

Prerequisites:

  • Users have SDE version 4.9 or later.
  • Users have an existing backup archive whose version is identical to their version of SDE.
  • Users have sudo access.

Steps:

  1. Use the restore subcommand and choose a backup archive:

# sde backup restore -i /file_path/backup_file.tar.gz

  1. The files from the backup archive begin to restore, and a backup archive of your current database is created:

sde> Restoring files from /file_path/backup_file.tar.gz archive

sde> Creating backup of current database...

sde>

sde> Dropping current database...

sde>

sde> Creating new database...

sde>

sde> Restoration from backup backup_file.tar.gz completed.

 

Schedule backups with Cron

Define Cron jobs in your SDE instance’s /etc/sde/custom.yaml file to make sure they are not lost between upgrades.

The following is an example of a Cron configuration that makes a backup every 12 hours. More examples can be found in the custom.yaml file:

cron::crontab::jobs:

 backup_sde:

   command: 'sde backup create'

   hour: '*/12'

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments