Backing Up and Restoring Red

Red can be backed up and restored to any system as long as it is a supported per our End-user Guarantees. The system it’s restored to can be different from the system that was backed up.

Note

Some 3rd-party cogs may not support all systems that Core Red supports and such cogs may therefore not work, if restored to an unsupported system. This does not affect cogs that do not impose additional restrictions.

Creating backups

Windows

To make a backup, perform the following steps:

  1. Stop the bot, ideally with [p]shutdown.

  2. Activate your venv.

    "%userprofile%\redenv\Scripts\activate.bat"
    
  3. Backup your Red instance with the following command:

    redbot-setup backup <your instance name>
    

    Attention

    Replace <your instance name> with the name of the instance you want to backup.

  4. The command will create a backup file for you and show you the path to it.

Tip

If you want to backup your instance to a custom folder, you can run the redbot-setup backup command as shown below, replacing C:\path\to\backup\folder with the path to the folder that you want to backup your instance to:

redbot-setup backup <your instance name> C:\path\to\backup\folder

Linux & Mac

To make a backup, perform the following steps:

  1. Stop the bot, ideally with [p]shutdown.

  2. Activate your venv.

    source ~/redenv/bin/activate
    
  3. Backup your Red instance with the following command:

    redbot-setup backup <your instance name>
    

    Attention

    Replace <your instance name> with the name of the instance you want to backup.

  4. The command will create a backup file for you and show you the path to it.

Tip

If you want to backup your instance to a custom folder, you can run the redbot-setup backup command as shown below, replacing /path/to/backup/folder with the path to the folder that you want to backup your instance to:

redbot-setup backup <your instance name> /path/to/backup/folder

Restoring backups

Windows

To restore a backup, perform the following steps:

  1. Install Red on the new machine/location, skipping the redbot-setup step.

  2. Activate your venv.

    "%userprofile%\redenv\Scripts\activate.bat"
    
  3. Restore your Red instance with the following command:

    redbot-setup restore C:\path\to\backup\file.tar.gz
    

    Attention

    Replace C:\path\to\backup\file.tar.gz with the path to the backup file that you want to restore from.

  4. The command will guide you through the restore process.

Linux & Mac

To restore a backup, perform the following steps:

  1. Install Red on the new machine/location, skipping the redbot-setup step.

  2. Activate your venv.

    source ~/redenv/bin/activate
    
  3. Restore your Red instance with the following command:

    redbot-setup restore /path/to/backup/file.tar.gz
    

    Attention

    Replace /path/to/backup/file.tar.gz with the path to the backup file that you want to restore from.

  4. The command will guide you through the restore process.