#420 functionality to Backup or Export profile or repository

Open
opened 3 weeks ago by pcastela · 3 comments
pcastela commented 3 weeks ago

as a user I would like to export my data,

  • if possible in a format that i can use or reimport
  • define whether whole profile data or just repository
as a user I would like to export my data, * if possible in a format that i can use or reimport * define whether whole profile data or just repository
fnetX commented 3 weeks ago
Collaborator

Hey there,

for a convenient way to import / export user data, there is an upstream issue for Gitea here: https://github.com/go-gitea/gitea/issues/1446

If you want to move to another Gitea instance, you can use the migration feature: At the Gitea instance of your choice, open a new migration (the plus tab in the navbar) and enter your data. I think, as long as you don't want to move to a completely different service (that is also unlikely to offer a fitting import feature), the migration tool is the way to go.

Also, third-party services exist (e. g. Gitea API tools) that give access to your data and can be used for import / export.

Hey there, for a convenient way to import / export user data, there is an upstream issue for Gitea here: https://github.com/go-gitea/gitea/issues/1446 If you want to move to another Gitea instance, you can use the migration feature: At the Gitea instance of your choice, open a new migration (the plus tab in the navbar) and enter your data. I think, as long as you don't want to move to a completely different service (that is also unlikely to offer a fitting import feature), the migration tool is the way to go. Also, third-party services exist (e. g. Gitea API tools) that give access to your data and can be used for import / export.
fnetX added the
gitea-related
label 3 weeks ago
fnetX added the
upstream
label 3 weeks ago
momar commented 3 weeks ago
Collaborator

Regarding actual solutions on that issue:

For issues & PRs, there's https://github.com/narando/export-gitea-org, which should be easily modifiable to work for users as well; otherwise there's the Tea CLI, but it's not directly providing an export/import function.

For repository contents, you could use something like for repo in $(tea repo -f owner,name -o simple | tr ' ' '/'); do mkdir "$repo" && git clone "git@codeberg.org:$repo.git" "$repo"; done in a POSIX shell.

Then there's also profile data, including public profile data, avatar picture, emails, theme, linked 2FA tokens (name only), linked accounts, access tokens (name & dates), OAuth2 grants (name & date), OAuth2 applications (name, redirect URI, client ID), SSH/GPG keys (name, fingerprint & dates), organization membership and a list of repositories - getting that into an easily re-importable format is not really feasible without official support by Gitea.

Regarding actual solutions on that issue: For issues & PRs, there's https://github.com/narando/export-gitea-org, which should be easily modifiable to work for users as well; otherwise there's the Tea CLI, but it's not directly providing an export/import function. For repository contents, you could use something like `for repo in $(tea repo -f owner,name -o simple | tr ' ' '/'); do mkdir "$repo" && git clone "git@codeberg.org:$repo.git" "$repo"; done` in a POSIX shell. Then there's also profile data, including public profile data, avatar picture, emails, theme, linked 2FA tokens (name only), linked accounts, access tokens (name & dates), OAuth2 grants (name & date), OAuth2 applications (name, redirect URI, client ID), SSH/GPG keys (name, fingerprint & dates), organization membership and a list of repositories - getting that into an easily re-importable format is not really feasible without official support by Gitea.
6543 commented 3 weeks ago
Collaborator

To get user/profile data it should be posible via api ...

https://try.gitea.io/api/swagger#/user/userGetCurrent

Only missing things: theme & privacy settings

To get user/profile data it should be posible via api ... https://try.gitea.io/api/swagger#/user/userGetCurrent Only missing things: theme & privacy settings
Sign in to join this conversation.
Loading…
There is no content yet.