A snapshot is a backup of the system settings and products. It includes:
A snapshot is very large. A snapshot includes the entire root partition and some of the /var/log
partition and other important files. For this reason, snapshots cannot be scheduled the same way that Backups can. Backup and Restore is the preferred method of recovery.
Notes:
Snapshot options:
Important - See sk98068: Gaia Limitations after Snapshot Recovery.
Best Practice for creating snapshots:
It is not recommended to use snapshots as a way of regularly backing up your system. System Backup is the preferred method. Schedule system backups on a regular basis, daily or weekly, to preserve the Gaia OS configuration and firewall database.
Before you create a snapshot image, make sure the Security Group or storage destination meets these prerequisites:
Note - A snapshot image is created in unallocated space on the disk. Not all of the unallocated space on a disk can be used for snapshots. To find out if you have enough free space for snapshots:
# gclish
> show snapshots
The output shows the amount of space on the disk available for snapshots.
Note - The value in the output does not represent all of the unallocated space on the disk.
The minimal size of a snapshot image is 2.5GB. Therefore, the minimal necessary free disk space in the export file location is 5GB.
See sk98068: Gaia Limitations after Snapshot Recovery.
You must run these commands in gClish.
Description
Manage system images (snapshots).
Syntax
add snapshot <Name of Snapshot> desc "<Description of Snapshot>" |
set snapshot export<SPACE><TAB> |
set snapshot export <Name of Snapshot> path <Path> name <Name of Exported Snapshot> |
set snapshot import <External Name of Snapshot> path <Path> name <Name of Imported Snapshot> |
set snapshot revert<SPACE><TAB> |
set snapshot revert <Name of Snapshot> |
Important - Reverting to the selected snapshot will overwrite the existing running configuration and settings. Make sure you know credentials of the snapshot, to which you revert.
show snapshot <Name of Snapshot> all date desc size |
show snapshots |
delete snapshot <Name of Snapshot> |
Important - After you add, configure, or delete features, run the save config
command to save the settings permanently.
Parameters
Parameter |
Description |
|
Configures the name of the snapshot image. You must enter a string that does not contain spaces. |
|
Configures the description of the snapshot image. You must enclose the text in double quotes, or enter the string that does not contain spaces. |
|
Selects the snapshot image you export by the specified name. You must enter a string that does not contain spaces. |
|
Selects the snapshot image you import by the specified name. You must enter a string that does not contain spaces. |
|
Configures the path to the specified snapshot image file (for example: |
|
Configures the name, under which the exported snapshot image file is stored on the hard disk. You must enter a string that does not contain spaces. |
|
Configures the name, under which the imported snapshot image is stored on Gaia. You must enter a string that does not contain spaces. |
Example
> add snapshot snap1 desc "First image after installation"
> set snapshot export snap1 path /var/log/ name image_after_installation |
Notes:
Description
Use the g_snapshot
command in the Expert mode to show and revert snapshots for specific SGMs or Chassis.
This command is different from the snapshot
command, which works for all SGMs together.
Syntax
# g_snapshot [-b <SGM_IDs>] show |
# g_snapshot [-b <SGM_IDs>] revert <snapshot_name> |
Parameters
Parameter |
Description |
---|---|
|
Shows saved snapshots for the specified SGMs or Chassis. |
|
Restores specified SGMs or Chassis to the specified snapshot. |
|
Snapshot file name. |
|
Works with SGMs and/or Chassis as specified by <SGM_IDs>.
|
Example 1 - Restore SGMs 1_1 and 1_4 to the snapshot called "My_Snapshot":
[Expert@MyChassis-ch01-01:0]# g_snapshot -b 1_1,1_4 revert My_Snapshot |
Example 2 - Restores the Chassis2 to the snapshot called "My_Snapshot":
[Expert@MyChassis-ch01-01:0]# g_snapshot –b chassis2 revert My_Snapshot |
Example 3 - Show the saved snapshots for all SGMs on the Chassis1:
[Expert@MyChassis-ch01-01:0]# g_snapshot -b chassis1 show |
Background
You can use image cloning as a tool for cloning SMO images by remote SGM. In addition to cloning the SMO version, it clones all installed hotfixes, if there are any.
We recommend that you use this tool when you add a new SGM to the setup, such as when you receive a replacement SGM.
When you activate the auto-clone feature, each SGM updates the local image's MD5 during reboot, Admin UP state or hotfix installation. If the local image's MD5 is different from the SMO image's MD5, then the local SGM clones the SMO image.
Working with image auto-clone in gClish:
Command |
Description |
---|---|
|
Shows the current auto-clone state. |
|
Controls the auto-cloning state:
|
Note - Image cloning does not support snapshot (the included fcd).
Working with image's MD5 in gClish:
Command |
Description |
---|---|
|
Shows image's MD5 |
|
Updates image's MD5 This is done automatically on reboot , admin UP and hotfix installation. |