Data backend migration #2137

Closed
Tobotimus wants to merge 7 commits from V3/backend_migration into V3/develop
Tobotimus commented 2018-09-18 15:39:11 +02:00 (Migrated from github.com)

This adds a fairly small script for migrating data from JSON to Mongo, and can be extended in the future for other backends if required. The script has a console entry point, redbot-migrate.

It operates by loading all of the data from an instance given its name, and dumping it to the destination storage backend. Users can then create a new instance which uses the new backend, and reference specify wherever they dumped the migrated data.

I've also cleaned up some other usage of the redbot.core.drivers package throughout the bot - no more lazy loading, driver classes are accessible at the top of the redbot.core.drivers package (it makes no sense to have to access a single class through a submodule as well) and some more documentation has been added.

This could also be used (although slightly cumbersome) to restore backed up JSON data to a mongo instance.

This adds a fairly small script for migrating data from JSON to Mongo, and can be extended in the future for other backends if required. The script has a console entry point, `redbot-migrate`. It operates by loading all of the data from an instance given its name, and dumping it to the destination storage backend. Users can then create a new instance which uses the new backend, and reference specify wherever they dumped the migrated data. I've also cleaned up some other usage of the `redbot.core.drivers` package throughout the bot - no more lazy loading, driver classes are accessible at the top of the `redbot.core.drivers` package (it makes no sense to have to access a single class through a submodule as well) and some more documentation has been added. This could also be used (although slightly cumbersome) to restore backed up JSON data to a mongo instance.
palmtree5 (Migrated from github.com) reviewed 2018-09-18 15:39:11 +02:00
tekulvw (Migrated from github.com) reviewed 2018-09-18 15:39:11 +02:00
Twentysix26 (Migrated from github.com) reviewed 2018-09-18 15:39:11 +02:00
Kowlin (Migrated from github.com) reviewed 2018-09-18 15:39:11 +02:00
Tobotimus commented 2018-09-19 03:13:35 +02:00 (Migrated from github.com)

Needs re-purposing

Needs re-purposing

Pull request closed

Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!2137
No description provided.