The /etc/scripts/backup-usb script been written to save and load custom configuration using a USB flash disk.
Before saving configuration locally, you must prepare the USB storage device for use. To do this, disconnect all USB storage devices except for the storage device you wish to use.
Usage: /etc/scripts/backup-usb COMMAND [FILE]
COMMAND:
check-magic -- check volume label
set-magic -- set volume label
save [FILE] -- save configuration to USB
delete [FILE] -- delete a configuration tarbal from USB
list -- list available config backups on USB
load [FILE] -- load a specific config from USB
load-default -- load the default configuration
set-default [FILE] -- set which file becomes the default
The first thing to do is to check if the USB disk has a label:
# /etc/scripts/backup-usb check-magic
If this command returns "Magic volume not found", then run the following command:
# /etc/scripts/backup-usb set-magic
To save the configuration:
# /etc/scripts/backup-usb save config-20May
To check if the backup was saved correctly:
# /etc/scripts/backup-usb list
If this command does not display "* config-20May" then there was an error saving the configuration.
The set-default command takes an input file as an argument and renames it to "default.opg". This default configuration remains stored on the USB disk. The next time you want to load the default config, it will be sourced from the new default.opg file. To set a config file as the default:
# /etc/scripts/backup-usb set-default config-20May
To load this default:
# /etc/scripts/backup-usb load-default
To load any other config file:
# /etc/scripts/backup-usb load {filename}
The /etc/scripts/backup-usb script can be executed directly with various COMMANDS or called from other custom scripts you may create. However it is recommended that you do not customize the /etc/scripts/backup-usb script itself at all.
Comments
0 comments
Article is closed for comments.