Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated restoration of a backup #5703

Open
3 tasks
palmtree5 opened this issue May 17, 2022 · 3 comments
Open
3 tasks

Automated restoration of a backup #5703

palmtree5 opened this issue May 17, 2022 · 3 comments
Assignees
Labels
Category: Cogs - Downloader This is related to the Downloader cog. Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Enhancement Something meant to enhance existing Red features. Type: Feature New feature or request.

Comments

@palmtree5
Copy link
Member

Type of feature request

Other

Description of the feature you're suggesting

The intention here is to have a restore function that would automatically restore from a backup, including:

  • Restoring the instance data to a user-defined location
  • Readd cog repos the user had added using [p]repo add
  • Readd cogs the user installed with [p]cog install

Anything else?

Note: I am intending to work on this myself at some point in the near future

@palmtree5 palmtree5 added Type: Enhancement Something meant to enhance existing Red features. Type: Feature New feature or request. Category: Bot Core Category: Cogs - Downloader This is related to the Downloader cog. labels May 17, 2022
@palmtree5 palmtree5 self-assigned this May 17, 2022
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label May 17, 2022
@Vexed01
Copy link
Contributor

Vexed01 commented May 17, 2022

Possible duplicate of #2947 / #3681

@Jackenmen Jackenmen added Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). and removed Category: Bot Core labels Feb 12, 2023
@palmtree5
Copy link
Member Author

So what I think I want to do here in terms of how to actually automate the restoration of a backup would ultimately have the user's steps be:

  1. Stop your existing instance
  2. Create a backup using redbot-setup backup
  3. Copy the backup to the new machine
  4. Install Red (with Postgres, if using it), stopping at the point of creating an instance
  5. Run redbot-setup restore <backup_file> to restore, which will then get everything set up, including redownloading installed repos and cogs.

The goal here in my mind is to basically recreate the environment as it was when the backup was made, ideally including using the same storage backend that was in use when the backup was created (i.e. if the backup was made on an instance that was using Postgres as the config backend, on restore we would convert back from JSON to Postgres)

@Flame442 Flame442 added Status: In Progress There's a PR open to deal with this, or an org member is working on this internally and removed Status: Needs Triage This has not been labeled or discussed for handling yet. labels Oct 29, 2023
@cswimr
Copy link
Contributor

cswimr commented Feb 1, 2024

I've created a cog (SeaCogs/Backup) that does some of the things this issue discusses, namely allowing for "automatic" installation of repositories and cogs when migrating. It reuses a lot of Downloader code, and works pretty well. However, some of the things I want to do with it are held back by it being a cog, and therefore having to run both manually and AFTER the bot initializes. It would be a lot better to incorporate something like this into Core. That way cogs that were loaded before stay loaded when the bot starts, because it's already cloned all of the repos/cogs before that point. Here's a Discord message link to a conversation Flame and I had about this idea in #coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - Downloader This is related to the Downloader cog. Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Status: In Progress There's a PR open to deal with this, or an org member is working on this internally Type: Enhancement Something meant to enhance existing Red features. Type: Feature New feature or request.
Projects
None yet
Development

No branches or pull requests

5 participants