Backup & restore
Last updated: January 2026
This document explains how to safely back up, restore, and maintain data for the Abey (gabey) node, including accounts, blockchain data, and database maintenance.
Data Directory
All persistent data used by gabey is stored in its data directory (with the exception of the PoW Ethash DAG, which is managed separately).
Default Data Directory Locations
macOS
~/Library/abeyfoundation
Linux
~/.abeyfoundation
Windows
%APPDATA%\abeyfoundation
Keystore (Critical)
Account private keys are stored in the keystore subdirectory inside the data directory.
The
keystoredirectory contains encrypted private keysThese files are portable across:
Nodes
Platforms
Client implementations (Go, C++, Python)
✅ Backing up the keystore directory is sufficient to recover your accounts, provided you know the passwords.
❌ Losing both the keystore and the password results in permanent loss of funds.
Custom Data Directory
You may specify a custom data directory using the --datadir flag:
For all available CLI options, see:
https://github.com/abeyfoundation/go-abey/wiki/Command-Line-Options
Database Upgrades
Occasionally, internal database formats change between releases.
To upgrade the database format, ensure gabey is not running, then execute:
This operation updates internal structures without affecting your keystore.
Database Cleanup
To remove the blockchain and state databases:
Important Notes
This deletes blockchain and state data only
The
keystoredirectory is not affectedUseful when:
Resyncing from scratch
Switching networks
Fixing corrupted chain data
Blockchain Export
You can export the blockchain to a binary file for backup or migration purposes.
Export Full Chain
Export a Block Range
To export a specific block range (for example, the first epoch):
When exporting partial chains, data is appended to the output file rather than overwritten.
Blockchain Import
Import a previously exported blockchain file using:
This allows fast restoration without full resynchronization.
Best Practices
Back up your keystore directory regularly
Store backups offline or in secure, encrypted storage
Never share keystore files or passwords
Stop
gabeybefore performing upgrades or database operationsVerify backups by restoring them on a test system
Last updated