Fiber Node Backup
Back up and restore Fiber v0.9.1 node data
TL;DR
Fiber v0.9.1 creates online backups automatically under
$BASE_DIR/fiber/backups/<timestamp>. Enable the admin RPC module when you
also need an immediate manual backup. To restore one of these backup
directories, stop the node, run fnn --restore <backup-directory>, and then
start the node normally with the same FIBER_SECRET_KEY_PASSWORD.
What a v0.9.1 Backup Contains
Each timestamped native-node backup contains:
db/— a consistent RocksDB checkpoint of the Fiber store;key— the encrypted CKB private-key file; andsk— the Fiber network identity key.
Nodes created by the installer
Back up the entire install directory. The Unix bootstrap installer uses ~/.fiber by default; guided Unix and Windows installs use the directory you selected. After restoring it, run ./start-node.sh on Linux/macOS or .\start-node.ps1 on Windows and provide the same FIBER_SECRET_KEY_PASSWORD.
The backup does not contain config.yml or your
FIBER_SECRET_KEY_PASSWORD. Store those separately in an encrypted location.
Anyone with both the encrypted key and its password can control the associated
funds.
Automatic Online Backups
When the Fiber service is running, v0.9.1 schedules a backup every 24 hours. Important channel-state changes pull the next backup forward so it normally runs within 60 seconds. The default location is:
<BASE_DIR>/fiber/backups/<timestamp>/For example, a node started with -d ./node1 writes backups below
./node1/fiber/backups/. These are live database checkpoints, so the node does
not need to stop while they are created.
Check that backups are appearing and contain the database and both key files:
find ./node1/fiber/backups -maxdepth 2 -type fCopy backups off the node
The built-in backup directory is on the same disk as the live database. Copy completed timestamp directories to encrypted storage on another device or host so a disk failure does not destroy both copies.
Trigger an Immediate Backup
The admin RPC module is not enabled by default. Add it while retaining the
standard modules you use:
rpc:
listening_addr: "127.0.0.1:8227"
enabled_modules:
- cch
- channel
- graph
- payment
- info
- invoice
- peer
- adminRestart the node after changing the module list, then trigger a backup with either interface:
fnn-cli admin backupcurl --location 'http://127.0.0.1:8227' \
--header 'Content-Type: application/json' \
--data '{"id":1,"jsonrpc":"2.0","method":"backup","params":[]}'A successful request returns null and creates a new timestamped directory.
Keep the RPC listener private; if you expose it beyond the local machine,
configure Biscuit authentication and grant administrative access only to a
trusted operator.
Create a Full Offline Archive
The built-in backup covers the Fiber database and node keys. A stopped-node archive is still useful when you also want the exact configuration and other files from the data directory:
# Stop fnn cleanly first, then archive the complete data directory.
tar -zcvf node1.tar.gz node1Store node1.tar.gz and the password separately. Restore this form of backup
by extracting it and starting Fiber with the same base directory:
tar -zxvf node1.tar.gz
FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' ./fnn -c ./node1/config.yml -d ./node1Restore a v0.9.1 Online Backup
Stop the node before restoring. Pass the timestamped directory itself—not its
db subdirectory—to --restore.
v0.9.1 native restore requirement
Restore into the stopped node's existing, initialized base directory. The
v0.9.1 native binary cannot restore into an empty base directory, and its
read-only fiber/sk file prevents an in-place restore unless you make that
file writable first. The restored key returns to read-only mode.
chmod u+w ./node1/fiber/sk
./fnn \
-c ./node1/config.yml \
-d ./node1 \
--restore ./node1/fiber/backups/<timestamp>The restore command restores the database and the backed-up key and sk
files, then exits. Start the node normally afterward:
FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' ./fnn -c ./node1/config.yml -d ./node1The restore process preserves the replaced database as a timestamped safety
backup. Channels that could carry penalty risk are marked Stale; Fiber must
passively audit them with their peers before normal operation resumes. Keep the
node online and connected to those peers, and do not assume a restored channel
is spendable merely because it exists in list_channels.
Cross-Version Restore
From v0.8.x to v0.9.1
For a complete v0.8.x data-directory backup, extract it and start the v0.9.1 binary. Fiber detects the older database and runs the supported migration on startup after confirmation.
tar -zxvf node1.tar.gz
FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' ./fnn -c ./node1/config.yml -d ./node1From v0.7.x or Older to v0.9.1
Databases older than version 20260302100001 cannot migrate directly with the
v0.9.1 fnn binary. First use the v0.8.x fnn-migrate tool to upgrade the
database, then start v0.9.1:
./fnn-migrate -d ./node1
FIBER_SECRET_KEY_PASSWORD='YOUR_PASSWORD' ./fnn -c ./node1/config.yml -d ./node1Storage migration has been integrated into fnn since v0.9.0-rc1. The
archived v0.8.x fnn-migrate binary is needed only for databases created
before v0.8.x.