LiveOS & Disaster Recovery

Running from RAM with Centralized Configuration — Backup, restoration, and rapid system recovery
OviOS Linux 6.2 LiveOS · RAM Boot Stateless Backup & Restore
← Home ← Back to Docs

1 The Concept: Total Reproducibility

OviOS is architected for extreme portability. Unlike traditional operating systems where configuration is scattered across the filesystem, OviOS centralizes all system settings within its metadata-driven design. This means a full system rebuild — or a pivot from a disk-based install to a RAM-based Live OS — takes seconds.

Key Architecture Principles

Metadata-Centric Storage

Settings for LUNs, replication, NFS, and SMB are stored as metadata directly within the storage pools, LUNs, and volumes — not on the OS disk. From 6.2 the whole node configuration is also saved to every pool on each change (section 3).

Centralized OS Config

All core system parameters are held in a single primary configuration file that can be backed up, transferred, and restored in one operation.

Decoupled Design

Configuration is completely decoupled from the installation media. Rebuild a crashed system or boot entirely from RAM by restoring one backup archive.

💡

Because your data and metadata live on the ZFS pools — not the OS disk — a failed system disk never means lost data. You reinstall, restore, and you're back.

2 First Run: Initial Setup

When booting the appliance for the first time, refer to the Admin Manual for initial pool creation.

Why is skip.import Enabled by Default?

On the first run, the option skip.import is set to 1 (on). This prevents the system from attempting to auto-import ZFS pools before the user has defined the environment, ensuring a clean state for initial configuration.

Once your pools are created and you want automatic import on subsequent boots, set it to off:

options skip.import 0

3 Stateless Operation (OviOS 6.2)

OviOS 6.2 can run stateless: the node never needs a configured boot disk. Boot it from a USB stick, an ISO or the network (PXE), and it restores its own configuration from your storage pools at every boot. Replace the USB stick, boot a newer image, or boot hundreds of identical nodes from one PXE server — each node comes back exactly as it was.

3.1 Two ways to be stateless

MethodHowWhere the configuration comes from
Kernel line (recommended)Boot with ovios.autorestore=1 The newest saved generation in the hidden .ovios-system dataset on your pools. Saved automatically on every change.
Backup archiveoptions auto.restore.enable on The newest backup archive (.tar.gz) in the osbackup dataset of system.backup.pool, or /tmp/osbackup. Archives are created only when you run sync-config bo (schedule it with edit-cron).

The kernel line wins if both are present. The version command shows which one is in effect.

3.2 How the kernel-line method works

Saving. Every configuration change is copied to a hidden dataset on each data pool, one per node: <pool>/.ovios-system/<node-id>. The node id is the machine's DMI system UUID, so several nodes can share the same pools without overwriting each other. Each save becomes a ZFS snapshot (a generation); the newest 10 are kept. Saves happen automatically after options changes, iSCSI target, LUN and CHAP changes, pool create, the SMB/NFS export, user, AD-join and network tools, passwd, hostnamectl, configuration restores, and at shutdown.

Restoring. Early at boot, before networking and before any service starts, OviOS imports the pools read-only, restores the newest generation saved by this node, exports the pools again, and enables the services that the restored ovios.conf asks for. The normal boot then imports your pools and starts everything.

⚠️

For the pools to be imported after the restore, the saved configuration must have options skip.import off (the default is on). Set it once while the node is running.

3.3 What is saved

Always savedOnly with smb.secrets.restore on
OviOS options and settings (/etc/ovios, including the web dashboard password, S3 settings and TLS certificates)
iSCSI targets, LUN mappings, initiator ACLs and CHAP accounts (/etc/tgt)
SMB configuration and share state (/etc/samba, /var/lib/samba)
Network (/etc/systemd/network, ethtool settings), hostname, hosts, DNS
Local users and groups with their Unix passwords (/etc/passwd, /etc/shadow, /etc/group, /etc/gshadow)
Crontabs edited with edit-cron (/var/spool/fcron; persist only, not part of sync-config archives)
Prometheus configuration (/etc/prometheus)
root's SSH keys, Kerberos client configuration, PAM settings
The Samba password database (passdb.tdb)
Samba secrets, including the Active Directory machine account (secrets.tdb, /var/lib/samba/private)
The Kerberos keytab (krb5.keytab)

Pool data, LUN properties and share properties live on the pools themselves and need no copying.

3.4 SMB passwords and the Active Directory join: smb.secrets.restore

Samba keeps SMB passwords and the domain machine account in its own databases, separate from the Unix passwords. Decide whether those secrets may be stored on your pools:

options smb.secrets.restore on    # keep SMB passwords and the AD join across reboots
options smb.secrets.restore off   # default: do not store them
SettingAfter a stateless reboot
onSMB users log in with their existing passwords; a node joined to Active Directory is still joined.
off (default)The users exist, but their SMB passwords must be set again (smb-user) and the node must re-join Active Directory (smb-join). Switching to off also deletes older saved generations that still contain the secrets.

3.5 Commands

sync-config persist          # save the configuration to all pools now
sync-config persist-status   # saved generations per pool, and pools that were skipped and why
sync-config persist-restore 168  # apply generation 168 on the running node

persist-restore asks for confirmation, writes the chosen generation back (files created after it are kept), restarts cron so restored crontabs load, and saves the result as a new generation, so the next boot restores this state rather than the newer one. Then apply it with restore all and service reset.

Saves skip the system pools (rpool, bpool), pools excluded with exclude.pools, and pools that are faulted or imported read-only.

3.6 Boot options

Kernel optionUse
ovios.autorestore=1Turns the restore on. Write it exactly like this; a bare ovios.autorestore or =0 does nothing.
ovios.autorestore.force=1Also import pools that were not cleanly exported and carry another host id. Needed once when converting an installed node to stateless or after hardware replacement. Do not leave it on for nodes on shared storage.
ovios.autorestore.anynode=1Accept another node's configuration: use it for the first boot after replacing a node's hardware (new DMI UUID). Remove it afterwards.
spl.spl_hostid=0x........Optional fixed ZFS host id. Not needed normally: OviOS derives a stable host id from the DMI UUID, so a node has the same host id on every boot.
# normal stateless node
... ovios.autorestore=1
# first boot after replacing a node's hardware
... ovios.autorestore=1 ovios.autorestore.anynode=1 ovios.autorestore.force=1

3.7 Upgrades, rollback and troubleshooting

Rolling upgrades can be done live, on installed systems and on nodes running the live OS: upgrade one node at a time while the rest keep serving. On a live node, an upgrade applied in RAM lasts until the next reboot. To make it permanent, boot the newer image, and boot the previous image to roll back. The configuration follows either way. Each generation records the OviOS release that wrote it, and the restore logs a note when it comes from an older or newer release.

journalctl -b -u ovios-autorestore   # what was restored at this boot
cat /var/log/ovios/persist.log          # every save and restore

If sync-config persist-status reports a pool as still imported read-only by ovios-autorestore, the export at boot failed; fix it with zpool export <pool> followed by service zfs start from the system shell.

4 Backing Up Configuration

Before a failure occurs, you must maintain a current backup of your system state. OviOS configuration backups are compact .tar.gz archives that capture everything needed to fully rebuild the system.

Configuration Tuning

  • Files to Sync: Backup archives and configuration sync do not include the network configuration by default, so a replication partner keeps its own network setup. To include extra files or directories, add their paths to options files.to.sync, for example options files.to.sync /etc/systemd/network. (Stateless saves to the pools always include the network configuration.)
  • Target Pool: Ensure system.backup.pool is defined when using sync-config so backups are written to the correct pool.
options system.backup.pool       # check which pool backups go to
options system.backup.pool osb  # set backup pool to 'osb'

Backup Methods

MethodCommand / Action
CLIManual sync-config bo
CLIScheduled (Cron) Add /bin/os sync-config bo to your crontab via edit-cron
APICURL curl -k https://oviosadm:ovios@ovios-storage:8443/api/v1/sys/backup
Web UI Navigate to OviOS Web Monitoring → click Backup Config

Creating and Restoring a Backup via CLI

# Verify your backup pool is set
ovios-shell ➤ options system.backup.pool
option system.backup.pool  osb

# Create a backup archive
ovios-shell ➤ sync-config bo
Backup archive created: /ovios/osb/osbackup/osbackup-20260506_205325.tar.gz

# Restore from the latest backup
ovios-shell ➤ sync-config restore
Verifying archive: /ovios/osb/osbackup/osbackup-20260506_205325.tar.gz
[RESTORING] Applying system configuration...
[SUCCESS] Restore finished. Reloading systemd...
Configuration restored from backup successfully.
💡

Schedule sync-config bo with edit-cron to keep backup archives current. Note that autosync.enable is a different feature: it pushes configuration changes to replication partners (see the Replication Guide). For continuous protection of the node itself, use the stateless saves in section 3, which happen automatically.

5 Restoring Configuration

Use these steps for a new installation, a system disk replacement, or when restarting in RAM mode. The process is the same in all cases.

Pre-Restoration: Mount the Backup Pool

If your backup resides on a storage pool (rather than external media), you must manually mount the pool before restoring:

options skip.import 0   # allow ZFS pool import
service zfs start        # import and mount pools

Restoration via CLI

🔄 Full Recovery Sequence

  1. Restore the configuration archive. Point to the backup path on the imported pool:
    sync-config restore <path_to_backup.tar.gz>
  2. Restore all pool metadata, LUN topology, and ACLs:
    restore all
  3. Restart all enabled services (iSCSI, NFS, SMB):
    service reset

Restoration via API or Web UI

For uploading a backup file to a fresh RAM instance from a remote machine:

  1. Enable web access on the new instance:
    options ovios-web.enable on
  2. Upload backup via CURL:
    curl -k -XPOST https://oviosadm:ovios@ovios-storage:8443/api/v1/sys/restore \
      -F config_file=@/path/to/backup.tar.gz
  3. Upload via Web UI: Navigate to OviOS Web Monitoring → use the Restore Config button to upload your local .tar.gz file.
⚠️

Authentication Note: If the restored backup contains a different password than the default, the Web UI will log you out immediately upon restore. Re-login using your original credentials from the backup.

6 Finalization & Verification

After restoration, apply the pool metadata and restart the full service stack to bring the system to its desired state.

The Finalize Commands

CommandWhat It Does
restore all Reads pool flags, performs LUN consistency checks, and recreates the full iSCSI target topology and ACLs. This step is critical.
service reset Restarts all services (iSCSI, NFS, SMB) that are marked as enabled in the restored configuration.

Verifying the Restored System

ovios hc   # full health check — verify all services and pools are online

Troubleshooting: iSCSI Portal

If the iSCSI service fails to start after a restore, check your portal binding. If options iscsi.address is bound to an IP address that no longer exists on the current hardware or instance, reset it to the current valid IP:

options iscsi.address                      # check current portal binding
options iscsi.address 192.168.10.20     # update to current interface IP

7 Success & Next Steps

At this stage, your LUNs, NFS shares, and SMB shares should be fully accessible. The system is now running in its desired state — regardless of whether it was booted from a disk or entirely from RAM.

✅

Regularly backup your configuration and test restoration procedures before you actually need them. A backup you've never tested is a backup you can't trust.

Recommended Ongoing Practices

  • Check sync-config persist-status to confirm every pool has a recent saved generation
  • Schedule sync-config bo in cron for periodic explicit snapshots of system state
  • Store a copy of your latest backup archive on external media or a separate pool
  • Run ovios hc after any configuration change to confirm system health
  • Document your iscsi.address IP and backup pool name — you'll need them during recovery