Backing Up and Restoring Red

Red can be backed up and restored to any device as long as it is a supported operating system. See page: End-user Guarantees.

Backup steps are to be done in order and carefully to avoid any issues.

  1. Take note of the installed cogs with [p]cogs; and cog repositories with [p]load downloader, then [p]repo list ([p] is your bot’s prefix).

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

  3. Activate your venv, and run redbot-setup backup <instancename>, replacing <instancename> with the name of your instance.

  4. Copy your backup file to the new machine/location.

  5. Extract the file to a location of your choice (remember the full path and make sure that the user you are going to install/run Red under can access this path).

  6. Install Red as normal on the new machine/location.

  7. Run redbot-setup in your venv to create a new instance, using the path you remembered above as your data path.

  8. Start your new instance.

  9. Re-add the cog repositories using the same names as before.

  10. Do [p]cog update.

  11. Re-add any cogs that were not re-installed (you may have to uninstall them first as Downloader may think they are still installed).

    Note

    The config (data) from cogs has been saved, but not the code itself.

    Tip

    You can fix permissions (if needed) on your directory using:

    sudo chown -R <user>:<user> ~/.local
    

    Replace <user> with your actual username.