backup command

Use the backup command to back up your whole system to a USB device or remote secure FTP server.

Synopsis

backup [--help]

backup -l usb [-Y]

backup -l sftp -s sftp_server -d sftp_directory -u user_ID [-p password] [-Y]

backup -e

backup -status

Description

Important:
  • To backup the management software to an SFTP server, the destination server must have Linux with Secure Shell (SSH) enabled. Otherwise, the backup operation might fail.
  • A backup that is created with the backup command (whether on an SFTP server or a USB device) does not appear in the list that is generated when you run the listBackups command, or in the Recent Backups table on the Backup and Restore page in the management software web interface.
The backup command backs up a snapshot of the IBM Flex System Manager® management partition, which includes:
  • Management software image
  • User registry for authentication
  • FSM configuration settings
  • Discovered endpoints and inventory
  • Configuration Patterns data (if applicable)
Tip: After the snapshot data is backed up, the remainder of the backup operation is used for copying the backup file to the specified destination. If you want to use the management software after the snapshot, but before the entire backup operation finishes, use the backup --status command to determine whether the snapshot is complete.

If you choose to back up to a USB device, several 2 GB files with the common part of file name YYYYmmddHHMMSS.tar.gz are created there. If you choose to back up to an SFTP server, a file named YYYYmmddHHMMSS.tar.gz is created there. YYYYmmddHHMMSS is the time at which the backup operation started.

Notes:
  • You must have smadmin authority to use this command.
  • The management server is stopped during the backup operation.

Options

-d sftp_directory
Specifies the directory path on the USB device or SFTP server where the backup file is saved. Example: -d /data/backup
-e
Displays the estimated uncompressed size of the backup.
--help
Displays detailed information about the command, including the syntax, a description of the command, a description of the options and operands, error codes, and examples.
-l usb | sftp
Specifies the type of storage location for the files.
usb
Specifies to use a connected USB device.
sftp
Specifies to use a remote secure FTP server.
-p password
Specifies the password of the designated user.
-s sftp_server
Specifies the path of the abstract SFTP server directory that will store the backup files.
--status
Displays the status of backup process.
-u user_ID
Specifies the user ID of a user who has the authority to access the SFTP server.
-Y
Specifies to automatically answer "yes" to all prompts.

Exit status

The following codes are returned by this command.
  • 0: The operation completed.
  • 1: A usage error occurred.
  • 2: An internal error occurred. Creation of the snapshot failed.
  • 3: The command was not performed because authentication failed or the user account is not authorized to perform the action.
  • 4: Failed to write to the USB device.
  • 5: A usable USB device was not found.
  • 6: Failed to transfer the backup file to the SFTP server.
  • 7: Backup or restore is already running.
  • 8: The usb option was specified, but an available USB device was not found.
  • 9: Unable to communicate with the SFTP server.
  • 10: Authentication with the SFTP server failed.
  • 11: The specified SFTP directory path is not correct.
  • 13: There was an unexpected error.
  • 14: Unable to mount the USB device.
  • 15: This command is not supported when HA is configured.
  • 16: The USB device is busy.
  • 17: Unable to estimate the size of the uncompressed backup.
  • 18: Unable to contact hypervisor for backup.
  • 30: Preparing the files for the image snapshot.
  • 31: Taking the image snapshot.
  • 32: Compressing and copying the image.
  • 50: Backup parameter validation failed.
  • 51: Backup notification processing failed.
  • 52: Backup preprocessing failed.
  • 53: Backup postprocessing failed.
  • 99: User responded no to continuation warning.

Examples

  1. Back up a system to a USB device
    This example illustrates how to back up your whole system to an attached USB device.
    backup -l usb
  2. Back up a system to a remote SFTP server
    This example illustrates how to back up your whole system to the /backup directory on the remote secure FTP server with the host name ftp.yourserver.com.
    backup -l sftp -s ftp.yourserver.com -d /backup -u admin -p password
  3. Back up a system to a specified directory on a USB device.

    This example illustrates how to back up your whole system to the /backup directory of an attached USB device.

    backup -l usb -d /backup
  4. Get the estimated total uncompressed size of the backup file or files.

    This example illustrates how to get the estimated total uncompressed size of the backup.

    backup -e
  5. Get the status of the backup process.

    This example illustrates how to get the status of the backup process while a backup is running.

    backup --status