lightshot

Notes:

Description

Utility to work with light Gaia OS snapshots.

The log file for this utility: /var/log/lightshot.log

The utility saves the snapshots in this partition: /mnt/lightshot

Syntax

lightshot -h

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      callback

            -h

            update-token

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      clone

            -h

            --reboot

            --ssh-mode

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      create

            -h

           [--descr <"Description>"]

           [--force]

           [<Name of Snapshot>]

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      delete

            -h

           [--fcd]

           [--force]

           [--keep <Number>]

           [<Name of Snapshot>]

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      expert

            -h

            mount

            show-token

            umount

            update-token

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      import

            -h

           [<Name of Snapshot>]

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      restore

            -h

           [--fcd]

           [--now]

           [--reboot]

           [<Name of Snapshot>]

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      set

            -h

            configuration

                  -h

                  state {enabled | disabled}

                  verbosity {0 | 1 | 2 | 3}

lightshot [--ip <IP Address> [--username <Username>] [--pswd <Password>]] [--format {txt | json | yaml}

      show

            -h

            configuration

                  -h

                  savelogs

            diff

                  -h

                  <Name of Snapshot 1> <Name of Snapshot 1>

            partition

                  -h

                  [--filter <Parameter>]

            snapshot

                  -h

                  [--name <Name of Snapshot>]

            snapshots

                  -h

                  [--verbose]

Parameters

Parameter

Description

-h

Shows the built-in help.

--ip <IP Address

Specifies the IP address of a remote Gaia server.

This IP address must be reachable over the SSH protocol.

  • --username <Username>]

    Specifies the username for an SSH connection.

    This username must have root permissions.

  • --pswd <Password>

    Specifies the password for an SSH connection.

--format {txt | json | yaml}

Specifies the output format:

  • txt - Plain text (this is the default)

  • json - JSON

  • yaml - YAML

lightshot callback

Deletes the registered request to restore a lightshot snapshot (with the "lightshot restore" sub-command) during the next reboot.

This command works only if you did not reboot the Gaia server yet.

lightshot clone <Parameters>

Clones the lightshot snapshot from a remote Gaia server to this Gaia server.

  • --ssh-mode

    Forces to use the SSH protocol.

  • --reboot

    Forces to reboot after the cloning.

These parameters are mandatory for this sub-command:

--ip <IP Address> [--username <Username>] [--pswd <Password>]

lightshot create <Parameters>

Creates a new lightshot snapshot.

  • --descr <"Description>"

    Specifies the description for this snapshot.

  • --force

    Forces the update of an existing snapshot file.

  • <Name of Snapshot>

    Specifies the name of the snapshot.

lightshot delete <Parameters>

Deletes an existing lightshot snapshot.

  • --fcd

    Forces the deletion of an entire partition.

  • --force

    Forces the deletion of an existing snapshot file.

  • --keep <Number>

    Configures the number of last snapshots to keep.

    In the last parameter "<Name of Snapshot>", you can enter a string to filter for snapshots, whose name contains this string.

  • <Name of Snapshot>

    Specifies the name of the snapshot.

lightshot expert <Parameters>

Expert sub-commands:

  • mount

  • show-token

  • umount

  • update-token

lightshot import <Parameters>

Imports the lightshot snapshot from a remote Gaia server to this Gaia server.

  • <Name of Snapshot>

    Specifies the name of the snapshot.

lightshot restore <Parameters>

Restores an existing lightshot snapshot on this Gaia server.

You must make sure that the size of the Lightshot partition equals, at a minimum, to the size of the snapshot you need to restore.

  • --fcd

    Forces the restoration of an entire partition.

  • --now

    Forces the immediate restoration.

  • --reboot

    Forces the restoration after a reboot.

  • <Name of Snapshot>

    Specifies the name of the snapshot.

lightshot set <Parameters>

Configures the lightshot snapshot settings.

  • configuration savelogs state

    Enables or disables (this is the default) the saving of the logs state.

  • configuration savelogs verbosity {0 | 1 | 2 | 3}

    Configures the log verbosity level:

    • 0 - General Log (this is the default)

    • 1 - General Log, and Commands

    • 2 - General Log, Commands, and HCP

    • 3 - General Log, Commands, HCP, CPInfo, and CPviewDB

lightshot show configuration <Parameters>

Shows the lightshot configuration for logs.

  • configuration savelogs

    Shows the log state and log verbosity level.

lightshot show diff <Parameters>

Compares two specified lightshot snapshots.

lightshot show partition <Parameters>

Shows the information about the Lightshot partition.

  • partition --filter <Parameter>

    Shows only the specified parameter:

    • available

    • mount-on

    • required-space

    • size

    • used

lightshot show snapshot <Parameters>

Shows the specified existing lightshot snapshots (Name, Description, Date and Time).

lightshot show snapshots <Parameters>

Shows all existing lightshot snapshots (Name, Description, Date and Time).

  • snapshots --verbose

    Also shows the snapshot size (this output can take some time).