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

export / import CLI tooling #188

Closed
tsmethurst opened this issue Sep 3, 2021 · 0 comments · Fixed by #194
Closed

export / import CLI tooling #188

tsmethurst opened this issue Sep 3, 2021 · 0 comments · Fixed by #194
Assignees
Labels
deployment Issue relating to deployment of GoToSocial enhancement New feature or request

Comments

@tsmethurst
Copy link
Contributor

tsmethurst commented Sep 3, 2021

We should add some functionality for exporting and importing instance data, to facilitate the following scenarios:

  1. An admin wants to move their instance from one database type to another -- they should have a simple way of doing this without losing data.
  2. An admin wants to migrate from one pre-release database schema version to another, without having to do a total wipe of their data -- this is especially relevant given the schema changes made in Struct validation #186
  3. An admin wants to close their instance but might want to start it again later and not break federation by losing public + private keys of instance accounts.

A good place to add this functionality would be in the gotosocial CLI tool, under the admin command paths.

For example, we could have something like gotosocial admin export with parameters for specifying only local accounts, all accounts, etc, then gotosocial admin import. These commands could export to/import from a JSON file.

Minimum viable export/import

To make export + import across database migrations work, we'd need to store the following:

  • Account -- store all local accounts, and store remote accounts that they follow/are followed by/block/are blocked by.
    • ID
    • CreatedAt
    • UpdatedAt
    • Username
    • Locked
    • Language
    • URI
    • URL
    • InboxURI
    • OutboxURI
    • FollowingURI
    • FollowersURI
    • FeaturedCollectionURI
    • ActorType
    • PrivateKey -- for local accounts only
    • PublicKey
    • PublicKeyURI
    • SuspendedAt
    • SuspensionOrigin
  • Block -- all fields
  • DomainBlock -- all fields
  • EmailDomainBlock -- all fields
  • Follow -- all fields
  • FollowRequest -- all fields
  • Instance -- all fields
  • User -- all fields

In this case, all statuses, emojis, faves, notifications, tokens, attachments, clients, and applications would be dropped.

@tsmethurst tsmethurst added enhancement New feature or request deployment Issue relating to deployment of GoToSocial labels Sep 3, 2021
@tsmethurst tsmethurst added this to the 0.1.0 milestone Sep 3, 2021
@tsmethurst tsmethurst self-assigned this Sep 7, 2021
@tsmethurst tsmethurst moved this from In progress to Review in progress in GoToSocial feature freeze/bug fixup #1: "This is not a sprint." Sep 8, 2021
GoToSocial feature freeze/bug fixup #1: "This is not a sprint." automation moved this from Review in progress to Done Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Issue relating to deployment of GoToSocial enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant