HollaEx®
⚙️ DashboardStart →
  • HollaEx® — The Crypto Exchange Solution
  • ☁️Cloud Operators
    • Launching the Exchange
    • Setting Domain for Cloud Exchanges
    • Easy SMTP for Cloud Exchanges
    • SEO Settings for Cloud Exchanges
      • SEO Advanced Settings
  • ⚙️Operating Your Exchange
    • Operator Control Panel
      • General
      • Users
      • User Profile
      • Assets
      • Markets
      • Stakes
      • Sessions
      • Plugins Apps
      • Trading Fees & Account Tiers
      • Roles
      • Chat
      • Billing
    • Customize Exchange
      • Browser Tools
        • Enter Edit Mode
        • Operator Controls (Visuals)
        • Console
      • Plugins
      • Forked Repo
    • Fiat Controls
      • Initial Setup
      • Setting Up Fiat On/ Off Ramp
      • Editing Deposit & Withdrawal Fees
      • Users Making Fiat Deposit
      • Users Trading With Fiat
      • User Making Fiat Withdrawal
    • Staking
    • OTC Broker
    • P2P
      • P2P Overview
      • P2P Setup
      • P2P Troubleshooting
      • P2P Vendor Flow
    • Smart Chain Trading
    • Assets & Trading Pairs
      • Add New Assets & Trading Pairs
      • Configure Pair Parameters
    • Set up the SMTP Email
      • Set up SMTP with AWS SES
      • Set up SMTP with Mailgun
      • Set up SMTP with SendGrid
      • Test the SMTP with Gmail
    • Enabling reCAPTCHA
    • Email Customization & Audit
    • DeFi Asset Staking Process
  • 🧩Plugins
    • HollaEx Plugins
      • Announcements
      • Bank
      • AWS SNS (Text Messages - SMS)
      • KYC
      • Automatic KYC
      • Messente
      • Advanced Referral
      • CoinMarketCap
      • Guardarian
    • Install Plugins
    • Developing Plugins
      • Development Walkthrough: Hello-Plugin
        • Initialization
        • Configuration
        • Scripting
        • Web View
        • The Final Product & Installation
      • Advanced
        • Initialization
        • Config
        • Server Script
        • Plugin Libraries
        • Web View
        • Final Plugin Product
        • Advanced Tutorial: Using the user meta field
        • Advanced Tutorial: Adding a new database table column
        • Advanced Tutorial: Creating a new database table
      • Simple Wallet Example
      • Web View Development
        • Overview
        • External dependencies
        • Getting started
        • Basic Tutorial: Hello Exchange Plugin web view
        • Advanced Tutorial: KYC Plugin web views
    • Bank Integration
      • Handling Deposits
      • Handling Withdrawals
  • 👷Developers
    • API Guide
      • API Example Scripts
    • Run Dev Mode
    • Build a New Front-end Interface
  • 🧰On-Premise Operators (Advanced Only)
    • On-Premise Exchange Setup
      • Getting Started — Requirements
      • Installation
      • Server Setup
      • Web Setup
      • Production
    • CLI How-Tos
      • Start Exchange
      • Stop Exchange
      • Upgrade Exchange
        • Build and Apply the Code Changes
      • Get Exchange Logs
      • Get a Backup and Restore
      • Exchange Migration
      • Command List
    • Run Exchange on Kubernetes
    • Troubleshooting Guide
  • 🚀Advanced
    • SEO Optimization
    • Nginx
    • Rate Limits
    • Database
      • Upgrade Database
    • Dependencies
    • Contents Delivery Network
      • Cloudflare CDN for HollaEx
      • CloudFront CDN for HollaEx
    • Load Balancer
      • AWS ELB
      • DigitalOcean LB
    • Customize Kubenretes Ingress
    • Exchange Keys
      • Exchange API Keys Troubleshoot
    • HollaEx on non-Linux
      • HollaEx on Windows
      • HollaEx on macOS
    • The Network Tool Library
      • Accessing the Network Tool Library
      • Functions
        • WebSocket
      • Simple Example: Creating a User and Wallet
      • Getting More Interesting: Orders with the Tools
        • Setup: Using the transferAsset function
        • Creating and Monitoring a Sell Order
        • Settling Fees
      • Private HollaEx Network
    • Docker Content Trust (DCT)
    • Revenue Sharing
  • 📦Releases
    • Release Notes
    • Side Notes
  • ➡️External Links
  • Blogs
  • Forum
  • Videos
  • Twitter X
  • Telegram
  • Interactive Demo
  • Discord Community
  • API Documentation
  • Tools Library Documentation
  • Node Library Documentation
  • Plugins Documentation
Powered by GitBook
On this page
  • Backup
  • HollaEx Kit folder
  • Exchange Database
  • Restore
  • Troubleshooting at the restore
  1. On-Premise Operators (Advanced Only)
  2. CLI How-Tos

Get a Backup and Restore

PreviousGet Exchange LogsNextExchange Migration

Last updated 2 years ago

Backing up your exchange periodically is extremely important. In this section, we explain how you can get a backup of your exchange and then restore it.

Backup

There are 3 things you should always periodically backup and store safely.

  • HollaEx Kit folder

  • Exchange Database

  • psql & pg_dump installed on the machine

HollaEx Kit folder

The HollaEx Kit folder got every necessary configuration for your exchange, certain credentials, and secrets used. It includes your exchange name, logo, currencies, trading pairs, and even your secrets such as database passwords. So please make sure to always keep it safe. It also means that by keeping the HollaEx Kit safe, It is very easy to recreate the entire exchange infrastructure.

Exchange Database

The HollaEx Kit exchange stores all exchange-related activities at the database. It uses PostgreSQL, so you can use any PostgreSQL-compatible dump tool to backup data. If you are using an external PostgreSQL database with HollaEx, we recommend you keep an eye on your database provider's backup feature. HollaEx CLI also provides a one-line command to easily dump the entire database.

hollaex toolbox --backup

Life hack tip: hollaex toolbox --backup --skip will make the backup command not show any interactive screen. This would be useful for building an automated backup Cronjob.

After a successful CLI dump of the database, the dump file will be stored in the/backups folder in your HollaEx Kit. The /backups folder is created automatically through the CLI if it doesn't exist.

Restore

You can easily recover the entire exchange assuming you already followed the backup process.

Run the following command. This will restore the exchange database based on the backup dump file you provided.

hollaex toolbox --restore <DUMP_FILE_PATH>

This command will take care of all of the data restore procedures.

After that, simply restart the server with hollaex server --restart when the procedures are done.

Troubleshooting at the restore

  • pg_restore: error: input file appears to be a text format dump. Please use psql.

This error could happen when the dump file is generated in a text format. The older version of HollaEx CLI had a text-formatted dump file generation. This is no longer being used, but if you have a dump generated a while ago, you could face this problem.

If you are facing this problem, you could fix it by going through the restore procedure manually.

The commands below would drop your current hollaex database and create a new empty one for the restoration.

psql -h localhost -p 5432 -U hollaex -d postgres
DROP DATABASE hollaex;
CREATE DATABASE hollaex;

Run the command below afterwards to finish the restoration.

psql -h localhost -p 5432 -d hollaex -U hollaex -W -f <DUMP_FILE_PATH>

If it asks for the DB password during the restore, you could check it at your HollaEx Kit's settings/secret file. The HOLLAEX_SECRET_DB_PASSWORD key is the one for the password.

If you are trying to migrate the exchange to a different server, please check instead.

🧰
this page