EasyManua.ls Logo

Tripp Lite B092-016 - Backing-Up the Configuration Off-Box

Tripp Lite B092-016
257 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
209
Chapter 15: Advanced Configuration
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conguration.
Theset-defaultcommandtakesaninputleasanargumentandrenamesitto"default.opg".Thisdefaultconguration
remainsstoredontheUSBdisk.Thenexttimeyouwanttoloadthedefaultcong,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.
15.1.9 Backing-up the configuration off-box
IfyoudonothaveaUSBonyourConsoleServeryoucanbackupthecongurationtoanoff-boxle.Beforebackingupyou
needtoarrangeawaytotransferthebackupoff-box.ThiscouldbeviaanNFSshare,aSamba(Windows)sharetoUSB
storageorcopiedoff-boxviathenetwork.Ifbackingupdirectlytooff-boxstorage,makesureitismounted.
/tmp isnotagoodlocationforthebackupexceptasatemporarylocationbeforetransferringitoff-box.The/tmp directory will
not survive a reboot. The /etc/configdirectoryisnotagoodplaceeither,asitwillnotsurvivearestore.
Backup and restore should be done by the root user to ensure correct file permissions are set. The config command is used to
create a backup tarball:
config -e <Output File>
The tarball will be saved to the indicated location. It will contain the contents of the /etc/config/ directory in an uncompressed
and unencrypted form.
Example nfs storage:
# mount -t nfs 192.168.0.2:/backups /mnt # config -e /mnt/b095.config # umount/mnt/
Exampletransferoff-boxviascp:
# config -e /tmp/b095.config
# scp /tmp/b095.config 192.168.0.2:/backups
The config command is also used to restore a backup:
config -i <Input File>
This will extract the contents of the previously created backup to /tmp,andthensynchronizethe /etc/config directory with the
copy in /tmp.
Oneproblemthatcancropuphereisthatthereisnotenoughroomin /tmp to extract files to. The following command will
temporarily increase the size of /tmp:
mount -t tmpfs -o remount,size=2048k tmpfs /var
Ifrestoringtoeitheranewunitoronethathasbeenfactorydefaulted,itisimportanttomakesurethattheprocess
generatingSSHkeysiseitherstoppedorcompletedbeforerestoringconguration.Ifthisisnotdone,thenamixofoldand
new keys may be put in place.
AsSSHusesthesekeystoavoidman-in-the-middleattacks,logginginmaybedisrupted.

Table of Contents