I cannot backup when the program is running. #10427

Open
opened 2025-11-02 09:07:07 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @wkwspirit on GitHub (Mar 13, 2023).

Description

I run gitea on windows. If I don't close the program, I can't back it up. I have run as an administrator, it's useless.

E:\Gitea>gitea-1.18.5-windows-4.0-amd64.exe dump
2023/03/13 22:37:18 ...dules/setting/log.go:288:newLogService() [I] Gitea v1.18.5 built with GNU Make 4.1, go1.19.6 : bindata, sqlite, sqlite_unlock_notify
2023/03/13 22:37:18 ...dules/setting/log.go:335:newLogService() [I] Gitea Log Mode: Console(Console:info)
2023/03/13 22:37:18 ...dules/setting/log.go:249:generateNamedLogger() [I] Router Log: Console(console:info)
2023/03/13 22:37:18 ...les/setting/cache.go:76:newCacheService() [I] Cache Service Enabled
2023/03/13 22:37:18 ...les/setting/cache.go:91:newCacheService() [I] Last Commit Cache Service Enabled
2023/03/13 22:37:18 ...s/setting/session.go:73:newSessionService() [I] Session Service Enabled
2023/03/13 22:37:18 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\attachments
2023/03/13 22:37:18 ...s/storage/storage.go:170:initAvatars() [I] Initialising Avatar storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\avatars
2023/03/13 22:37:18 ...s/storage/storage.go:188:initRepoAvatars() [I] Initialising Repository Avatar storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\repo-avatars
2023/03/13 22:37:18 ...s/storage/storage.go:182:initLFS() [I] Initialising LFS storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:/Gitea/data/lfs
2023/03/13 22:37:18 ...s/storage/storage.go:194:initRepoArchives() [I] Initialising Repository Archive storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\repo-archive
2023/03/13 22:37:18 ...s/storage/storage.go:200:initPackages() [I] Initialising Packages storage with type:
2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\packages
2023/03/13 22:37:18 cmd/dump.go:245:runDump() [I] Dumping local repositories... E:\Gitea\data\gitea-repositories
2023/03/13 22:37:18 cmd/dump.go:283:runDump() [I] Dumping database...
2023/03/13 22:37:18 cmd/dump.go:295:runDump() [I] Adding custom configuration file from E:/Gitea/custom/conf/app.ini
2023/03/13 22:37:18 cmd/dump.go:323:runDump() [I] Packing data directory...E:/Gitea/data
Failed to include data directory: open E:\Gitea\data\queues\common/LOCK: The process cannot access the file because it is being used by another process.
2023/03/13 22:37:18 cmd/dump.go:163:fatal() [F] Failed to include data directory: open E:\Gitea\data\queues\common/LOCK: The process cannot access the file because it is being used by another process.

Gitea Version

1.18.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

platform: windows10 x64
run on command-line

Database

SQLite

Originally created by @wkwspirit on GitHub (Mar 13, 2023). ### Description I run gitea on windows. If I don't close the program, I can't back it up. I have run as an administrator, it's useless. > E:\Gitea>gitea-1.18.5-windows-4.0-amd64.exe dump 2023/03/13 22:37:18 ...dules/setting/log.go:288:newLogService() [I] Gitea v1.18.5 built with GNU Make 4.1, go1.19.6 : bindata, sqlite, sqlite_unlock_notify 2023/03/13 22:37:18 ...dules/setting/log.go:335:newLogService() [I] Gitea Log Mode: Console(Console:info) 2023/03/13 22:37:18 ...dules/setting/log.go:249:generateNamedLogger() [I] Router Log: Console(console:info) 2023/03/13 22:37:18 ...les/setting/cache.go:76:newCacheService() [I] Cache Service Enabled 2023/03/13 22:37:18 ...les/setting/cache.go:91:newCacheService() [I] Last Commit Cache Service Enabled 2023/03/13 22:37:18 ...s/setting/session.go:73:newSessionService() [I] Session Service Enabled 2023/03/13 22:37:18 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\attachments 2023/03/13 22:37:18 ...s/storage/storage.go:170:initAvatars() [I] Initialising Avatar storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\avatars 2023/03/13 22:37:18 ...s/storage/storage.go:188:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\repo-avatars 2023/03/13 22:37:18 ...s/storage/storage.go:182:initLFS() [I] Initialising LFS storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:/Gitea/data/lfs 2023/03/13 22:37:18 ...s/storage/storage.go:194:initRepoArchives() [I] Initialising Repository Archive storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\repo-archive 2023/03/13 22:37:18 ...s/storage/storage.go:200:initPackages() [I] Initialising Packages storage with type: 2023/03/13 22:37:18 ...les/storage/local.go:46:NewLocalStorage() [I] Creating new Local Storage at E:\Gitea\data\packages 2023/03/13 22:37:18 cmd/dump.go:245:runDump() [I] Dumping local repositories... E:\Gitea\data\gitea-repositories 2023/03/13 22:37:18 cmd/dump.go:283:runDump() [I] Dumping database... 2023/03/13 22:37:18 cmd/dump.go:295:runDump() [I] Adding custom configuration file from E:/Gitea/custom/conf/app.ini 2023/03/13 22:37:18 cmd/dump.go:323:runDump() [I] Packing data directory...E:/Gitea/data Failed to include data directory: open E:\Gitea\data\queues\common/LOCK: The process cannot access the file because it is being used by another process. 2023/03/13 22:37:18 cmd/dump.go:163:fatal() [F] Failed to include data directory: open E:\Gitea\data\queues\common/LOCK: The process cannot access the file because it is being used by another process. ### Gitea Version 1.18.5 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? platform: windows10 x64 run on command-line ### Database SQLite
GiteaMirror added the type/proposal label 2025-11-02 09:07:07 -06:00
Author
Owner

@eeyrjmr commented on GitHub (Mar 13, 2023):

This is expected since running a backup while data is in flux can result in nondeterministic backups

Ideally stop the service to run the dump OR if you really want to keep it love try the flush command to force all data to be written

@eeyrjmr commented on GitHub (Mar 13, 2023): This is expected since running a backup while data is in flux can result in nondeterministic backups Ideally stop the service to run the dump OR if you really want to keep it love try the flush command to force all data to be written
Author
Owner

@lunny commented on GitHub (Mar 14, 2023):

Maybe we should drop to copy queue data in dump command.

@lunny commented on GitHub (Mar 14, 2023): Maybe we should drop to copy queue data in dump command.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10427