Skip to main content

Managing Gunbot Configuration Backups: A Step-by-Step Guide

Your config.js file is the core of your trading bot. Gunbot automatically creates a backup of config.js each time you apply new settings from the GUI. Use these backups to restore a previous configuration.

Understanding Gunbot Backups

When you save settings, Gunbot creates a backup of your current config.js file. Backups are stored in the /backups folder inside your main Gunbot folder, so you have a fallback when you need to revert.

Info

The config.js file contains all your Gunbot settings, including API keys, trading strategies, and pair configurations. Regularly backing up this file is crucial for safeguarding your setup.

How to Restore a Backup

To restore a previous configuration, follow these steps:

  1. Close Gunbot: Ensure that Gunbot is not running before you attempt to restore a backup.

  2. Navigate to the Backup Folder: Open your Gunbot folder and go to backups/config. Here, you'll find all your backup files, named with the date and time they were created.

  3. Choose Your Backup: Look for the backup you wish to restore. The file's name will help you identify when it was created.

  4. Copy Backup Contents: Open the backup file with a text editor (like Notepad). Select all the text (Ctrl+A) and copy it (Ctrl+C).

  5. Prepare the Main Config File: In the main Gunbot folder, find the config.js file and open it with a text editor. If you're using Windows and don't see the .js extension, just look for a file named config.

  6. Replace the Contents: In the config.js file, remove all existing text and paste the contents from your backup file.

  7. Save and Restart: Save the changes to config.js and start Gunbot to apply your restored settings.

Tips for Effective Backup Management

  • Check the backup folder periodically so it does not become crowded.
  • Rename backup files if needed to identify the configuration they contain.
  • Keep a separate manual backup of your best-performing configurations in a different folder.

Restoring a backup lets you revert to a previous setup quickly while keeping your trading strategy flexible.