-
Because you enable package management for a project I am pretty sure the packages are stored somewhere in
site/projects/<project-id>.In general you should backup the
sitedirectory because OneDev will only do regular DB backups which does not include the git repositories and everything else that is stored on disk and not in the DB. If your storage crashes and you do not have a backup of thesitedirectory you are pretty screwed. -
Package blobs are stored under
site/projects/<project id>/packages. However package names and versions are stored in database. If you are restoring to an old db snapshot, you will only see package names and versions published before that time, although blobs exist in file system. -
@jbauer Yes, I think so.... But the problem is that I wasn't restoring files, I was restoring the database only.
-
@robin Perhaps I should clarify that I'm using a MariaDB docker image and taking backup DB snapshots using MariaDB's built-in tools (dumping) and then sending the snapshots to cloud storage (using restic and rclone), but I'm pretty sure the database snapshot I'm using contains package data and location information.
So I was surprised to find no references to packages in the OneDev dashboard of my instance.
-
If you have latest db backup, please restore it to see if those packages are available.
-
Ignore my previous comment. Please run below sql against your database to see if the package references are actually in your database:
select * from o_pack where o_project_id=<id of project> -
@robin Sorry for the long reply. I reproduced the situation again and found that the problem was my actions: I removed old builds and this action affected the availability of packages. It was not obvious to me that deleting a build would delete the associated docker images in the registry. Otherwise, I deleted the old database and restored it from a snapshot - the packages were still there. So I am closing this issue, the problem was on my side.
-
Previous Value Current Value Open
Closed
-
Problem solved
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Use case
OneDev instance is running in docker on the server. The job build result (docker images) is pushed to the local packages repo. After restoring DB from a snapshot, I found that the Packages tab is clean now and i can't find the old docker images in the file system.
Question
Where does OneDev store packages in the file system? And how can I prevent the Packages tab from being cleared after restoring DB from backup?