Issues relating to backup/restore gitea

I’ve searched a lot both online, in gitea’s github issues, and in these forums for help, but none of what I had found had been helpful, so I’m not posting a new topic to get help from the community.

Information about the server: it’s running version 1.15.9 with the plan of upgrading this to the latest release (incrementally) after it is successfully restored to a new server. It’s running in Docker.

Steps to Reproduce Issue:

  1. The backup on the old server was conducted using the steps here
    Backup and Restore | Gitea Documentation

  2. Then the backed up gitea-dump-1699660123.zip gets created. I can download that to my desktop computer and it unzips without any issues.

  3. I rsync gitea-dump-1699660123.zip to the new server & that works fine.

  4. I run docker cp gitea-dump-1699660123.zip gitea:/tmp/ to copy the backup into the docker container.

  5. ISSUE #1: I open a shell in the docker container and run unzip gitea-dump-1699660123.zip which results in the following:

    Archive:  gitea-dump-1699660123.zip
    unzip: short read
    
  6. I’m unable to get past the above ISSUE #1, so I try the same process on 2 different servers, which give the same result.

  7. I then try something new and unzip gitea-dump-1699660123.zip in a directory outside of docker and decide to docker cp everyhing such as:

    docker cp app.ini gitea:/tmp/
    docker cp data/ gitea:/tmp/data
    docker cp repos/ gitea:/tmp/repos
    
  8. I then run the restore process as outlined here Backup and Restore | Gitea Documentation

  9. ISSUE #2: This appears to work and users are able to login, but clicking on any repo gives an Internal Server Error 500.

  10. I then set RUN_MODE=dev in app.ini & restart the gitea server.

  11. Now when I click on any of the repos on the new server, I get the following error message:

    An error has occurred:
    
    exit status 128 - fatal: not a git repository (or any parent up to mount point /)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    
  12. It’s not clear how to troubleshoot this issue, so I spun up a brand new VPS and got stuck again extracting the backup:

    bash-5.1$ unzip gitea-dump-1699660123.zip 
    Archive:  gitea-dump-1699660123.zip
    unzip: short read
    

Does anyone have any ideas on things to try to restore from the backup successfully?

bump as gitea just released a new version and I’m still unable to upgrade and need suggestions from others here.

Bump, bump, bump, bump, bump :grinning:

What is the docker based upon?
Is it alpine? If so are you using the REAL unzip or the function provided by busybox.

Busybox’s unzip has historically had this issue

Could it be a permissions issue? Are the files that you restore owned by the correct user?

I am following the official docker documentation here, which does not tell me what OS is running in the docker container, but cat /etc/os-release in docker confirms it’s Alpine-based. I did not realize it was using busybox for unzipping (checked /usr/bin and found unzip symlink to busybox).

I installed the real unzip and was able to successfully do this on two different servers. Thank you very much for your help.

1 Like