Skip to main content
Version: 2.202308.x.x RR

Backup and recovery

Instances of NEVIS product or components can be stored into archive files (tar) by using the "inst config backup" command of each individual instance. These files can be used to recreate instances in case a server has to be reinstalled from scratch.

Full backup

The shell script /root/tools/ can be used to create a compressed tar archive of all persistent data (all configuration files of the server), except the log files.

Sample script for remote backup via ssh

set -e
set -u

#create a backup
FILE=`ssh root@${SERVER} "/root/tools/"`

#transfer the file to the current working directory
scp root@${SERVER}:${FILE} .

#remove the backup file from the server
ssh root@${SERVER} "rm ${FILE}"
#delete backup files (e.g., older than one month)
oldF in `find . -mtime +30 | grep backup_${SERVER}`; do
rm $oldF

The file can be used for disaster recovery purposes:

  • A single file can be restored in case the file or its content has been lost. Example restoring the /etc/hosts file:

    tar xfz backup_appliance.zh.adnovum.ch_20110912201809.tgz etc/hosts
    cp etc/hosts /etc/hosts
  • The whole server can be recovered by a reinstallation of the nevisAppliance image. You can then restore all configuration files by extracting the backup archive in the root directory and activate them by a server reboot. Example for restoring the configuration:

    cd /
    tar xfz backup_appliance.zh.adnovum.ch_20110912201809.tgz
    shutdown -r now

Use the /tools/ script to back up your database on a database appliance.

Couchbase Deprecated: Use the /tools/ script to back up your Couchbase server's database.

Recover the boot partition

The boot partition can be recovered when booting the server from the nevisAppliance installation CDROM. Log in as user "root" and execute the script to re-initialize the boot partition.

Console output when recovering the boot partition

Afterwards, you can reboot your server from its disk and re-install the OS image as shown in the chapter Software updates.

Factory reset

You may want to delete everything except the network settings and the user's home directories within a nevisAppliance server to restore the server to its initial installation state. You can achieve this by creating the /etc/factory.reset file and then rebooting the server.


touch /etc/factory.reset
shutdown -r now