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

gitea dump does not include lfs folder if LFS_CONTENT_PATH is set to a custom folder #10058

Closed
2 of 7 tasks
gtino opened this issue Jan 29, 2020 · 7 comments
Closed
2 of 7 tasks

Comments

@gtino
Copy link

gtino commented Jan 29, 2020

  • Gitea version (or commit ref):
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Running gitea on Windows Server 2019 with LFS enabled. The command:
gitea dump ...
does not include the lfs folder if the folder is not in the default folder (e.g. c:\Program Files\Gitea\data\lfs).

I have my lfs folder in a RAID 1 volume (just like the repos and everything I need to backup) at D:/Gitea/data/lfs and I did set:

LFS_CONTENT_PATH = D:/Gitea/data/lfs

Im not a go expert but by reading the dump.go code looks like it simply includes the folders under c:\Program Files\Gitea\data without checking if the lfs folder is somewhere else. Of course adding a link does not work.

...

Screenshots

@bagasme
Copy link
Contributor

bagasme commented Jan 30, 2020

@gtino Which Gitea version did you use?

@gtino
Copy link
Author

gtino commented Jan 30, 2020

Gitea Version: 1.11.0+rc2

@gtino
Copy link
Author

gtino commented Feb 10, 2020

Looks like lfs are not dumped on official 1.11 release either. Is there maybe a setting that I am missing? I am zipping them separately myself, but it would be a lot easier if Gitea was taking care of dumping them along with the other files...

@mpb27
Copy link

mpb27 commented Feb 21, 2020

I am experiencing a similar issue (no LFS in backup with custom LFS_CONTENT_PATH=/home/git/gitea-lfs) on version 1.10.1.

@stale
Copy link

stale bot commented Apr 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 23, 2020
@zeripath
Copy link
Contributor

zeripath commented May 6, 2020

@PhilippHomann would you like to offer your fix as a PR to Gitea?

@stale stale bot removed the issue/stale label May 6, 2020
@PhilippHomann
Copy link
Contributor

@zeripath It is included in #10376 which still waits on second approval (:

ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
* Dump: Use mholt/archive/v3 to support tar including many compressions

Signed-off-by: Philipp Homann <[email protected]>

* Dump: Allow dump output to stdout

Signed-off-by: Philipp Homann <[email protected]>

* Dump: Fixed bug present since go-gitea#6677 where SessionConfig.Provider is never "file"

Signed-off-by: Philipp Homann <[email protected]>

* Dump: never pack RepoRootPath, LFS.ContentPath and LogRootPath when they are below AppDataPath

Signed-off-by: Philipp Homann <[email protected]>

* Dump: also dump LFS (fixes go-gitea#10058)

Signed-off-by: Philipp Homann <[email protected]>

* Dump: never dump CustomPath if CustomPath is a subdir of or equal to AppDataPath (fixes go-gitea#10365)

Signed-off-by: Philipp Homann <[email protected]>

* Use log.Info instead of fmt.Fprintf

Signed-off-by: Philipp Homann <[email protected]>

* import ordering

* make fmt

Co-authored-by: zeripath <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
Co-authored-by: Matti R <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants