functionality to Backup or Export profile or repository #420
Labels
No Label
accessibility
bug
bug
infrastructure
Codeberg
contributions welcome
docs
duplicate
enhancement
infrastructure
legal
licence / ToS
please chill
we are volunteers
public relations
question
question
user support
s/Forgejo
s/Pages
s/Weblate
s/Woodpecker
security
service
upstream
wontfix
No Milestone
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Codeberg/Community#420
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
as a user I would like to export my data,
Upstream: https://github.com/go-gitea/gitea/issues/1446
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.
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"; donein 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.
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
I made a super simple backup tool if anyone wants to use it: https://codeberg.org/CoopCoding/Codeberg-Backup-Tool
Upcomming gitea v1.15.0 has a new endpount to query/set user settings
That link is no good now.
FYI: This is being worked on in Forgejo by the name of the "Friendly Forge Format", with some plans at achieving standardization. Still ongoing.
https://lab.forgefriends.org/friendlyforgeformat/gof3