From 8626aef36fb03d822b3cdacef78f372e35554a9f Mon Sep 17 00:00:00 2001 From: EternalllZM <43221983+EternalllZM@users.noreply.github.com> Date: Tue, 3 Mar 2026 15:30:29 -0800 Subject: [PATCH] [Docs] Red backup and restore instructions. (#6654) --- .github/labeler.yml | 1 + docs/backup_red.rst | 35 +++++++++++++++++++ docs/host-list.rst | 5 ++- docs/index.rst | 1 + .../_includes/linux-preamble.rst | 2 +- 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 docs/backup_red.rst diff --git a/.github/labeler.yml b/.github/labeler.yml index 3fcdadadb..54467508b 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -273,6 +273,7 @@ - docs/bot_application_guide.rst - docs/install_guides/**/* - docs/update_red.rst + - docs/backup_red.rst "Category: Docs - Other": - docs/host-list.rst - docs/index.rst diff --git a/docs/backup_red.rst b/docs/backup_red.rst new file mode 100644 index 000000000..915c3e6a3 --- /dev/null +++ b/docs/backup_red.rst @@ -0,0 +1,35 @@ +.. _backup-red: + +============================ +Backing Up and Restoring Red +============================ + +Red can be backed up and restored to any device as long as it is supported operating system. See page: :ref:`end-user-guarantees`. + +Backup steps are to be done in order and carefully to avoid any issues. + +#. 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). +#. Stop the bot, ideally with ``[p]shutdown``. +#. Activate your venv, and run ``redbot-setup backup ``, replacing ```` with the name of your instance. +#. Copy your backup file to the new machine/location. +#. 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). +#. :ref:`Install Red ` as normal on the new machine/location. +#. Run ``redbot-setup`` in your venv to create a new instance, using the path you remembered above as your data path. +#. Start your new instance. +#. Re-add the cog repositories using the same names as before. +#. Do ``[p]cog update``. +#. 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: + + .. code-block:: bash + + sudo chown -R : ~/.local + + Replace ```` with your actual username. \ No newline at end of file diff --git a/docs/host-list.rst b/docs/host-list.rst index 20e696005..f8f9d37dc 100644 --- a/docs/host-list.rst +++ b/docs/host-list.rst @@ -32,12 +32,11 @@ First, we would like to make something clear: Hosting on a VPS or Dedicated Server ------------------------------------ -| You can host Red in a VPS running Linux or Windows. Using a Linux VPS is the +| You can host Red on a VPS running Linux or Windows. Using a Linux VPS is the recommended option. Dedicated servers also work but are overpowered and cost ineffective unless one plans to run a very large bot or use their server for more than just hosting Red. If you have already created an instance, Red can be moved to a different - server for hosting with a backup/restore process. More information and guidance - about this process is available in the `Red Support Server `_. + server for hosting using the :doc:`backup/restore process `. .. warning:: Please be aware that a Linux server is controlled through a command line. diff --git a/docs/index.rst b/docs/index.rst index e4423f0ec..4ee97bbb8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,6 +15,7 @@ Welcome to Red - Discord Bot's documentation! install_guides/index bot_application_guide update_red + backup_red about_venv autostart_windows autostart_mac diff --git a/docs/install_guides/_includes/linux-preamble.rst b/docs/install_guides/_includes/linux-preamble.rst index 54eb36996..eb07e840a 100644 --- a/docs/install_guides/_includes/linux-preamble.rst +++ b/docs/install_guides/_includes/linux-preamble.rst @@ -2,4 +2,4 @@ For safety reasons, DO NOT install Red with a root user. If you are unsure how to create a new user on Linux, see `DigitalOcean's tutorial: How To Create a New Sudo-enabled User - `_. + `_.