OviOS Linux Live is a method to use OviOS only running from a live CD without having to install.
OviOS Linux boots the live image writable in memory, allowing the system to be configured as if it was installed. The challenge here is to save the configuration in case of an intentional or unintentional reboot.
Saving and restoring the configuration in OviOS Linux live is very simple and straightforward.
1. Define an OS Backup Pool.
This is a storage pool that will contain a small volume called "osbackup". The system will store here system backups.
For example, if the pool is called "data"
ovios-shell> options system.backup.pool data
Note: If you want to reset this option, use setdef.
ovios-shell> options system.backup.pool setdef
2. Define files and / or directories to be backed up.
By default, sync-config (the tool used for backups) backs up the following system configuration files and directories:
Usually, when using OviOS Live, at least the network files should be added to this list.
Add files by editing the ovios.conf file:
bash-4.3# vim /etc/sysconfig/ovios.conf
And add a list of files and directories to the "SYNC_FILES" option:
SYNC_FILES="/etc/sysconfig/ov-net/ /etc/ypserv.conf /etc/yp.conf"
In this example we added the ov-net directory which contains the network configuration files, and the yp.conf and ypserv.conf files. You must use this format as in the example above.
3. Create a backup.
Run the sync-config tool with option bo or backup-only:
ovios-shell> sync-config backup-only
Found backup location to be /ovios/data/osbackup
Creating /ovios/data/osbackup/osbackup-2017-01-29_16-30-31.tar.gz ...
Created backup osbackup-2017-01-29_16-30-31.tar.gz
4. Restore after a reboot.
After a reboot (or in any situation when the Admin needs to restore the config from a backup), make sure the OS system backup pool is imported.
You may need to disable the skip.import option and run zfs-admin start.
Drop to the bash shell, if at this point you are in the ovios-shell, and run the following commands:
Dropping to the Linux bash shell...
bash-4.3# cd /
bash-4.3# tar xvf /ovios/data/osbackup/osbackup-2017-01-29_16-30-12.tar.gz
After this step, you should run:
To go back to the ovios-shell.
ovios-shell> services restart network
To start up the interfaces and re-assign the IPs.
ovios-shell> services start
To start all services which were previously enabled with "options".