You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add some functionality for exporting and importing instance data, to facilitate the following scenarios:
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.
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
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.
The text was updated successfully, but these errors were encountered:
We should add some functionality for exporting and importing instance data, to facilitate the following scenarios:
A good place to add this functionality would be in the
gotosocial
CLI tool, under theadmin
command paths.For example, we could have something like
gotosocial admin export
with parameters for specifying only local accounts, all accounts, etc, thengotosocial 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 onlyPublicKey
PublicKeyURI
SuspendedAt
SuspensionOrigin
Block
-- all fieldsDomainBlock
-- all fieldsEmailDomainBlock
-- all fieldsFollow
-- all fieldsFollowRequest
-- all fieldsInstance
-- all fieldsUser
-- all fieldsIn this case, all statuses, emojis, faves, notifications, tokens, attachments, clients, and applications would be dropped.
The text was updated successfully, but these errors were encountered: