Problems with hashed storage (backup and clean-up tasks)
Include the omnibus-gitlab package version with:
GitLab CE: 10.2.0-rc2
Whether the problems are caused on a fresh install or an upgrade(Describe the upgrade history)
Recently moved from legacy
to hashed
storage, following the migrate docs, once enabled I attempt to make a backup, but in the process I get the following output for all of the projects hosted in my GitLab instance.
root@474a07fe0e9e:/# gitlab-rake gitlab:backup:create
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
* klud/project1 ... [WARNING] Executing /opt/gitlab/embedded/bin/git --git-dir=/var/opt/gitlab/git-data/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git bundle create /var/opt/gitlab/backups/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.bundle --all
Ignoring error on klud/project1 - fatal: Unable to create '/var/opt/gitlab/backups/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.bundle.lock': No such file or directory
* klud/project1.wiki ... [SKIPPED]
.
.
.
* klud/projectN ... [WARNING] Executing /opt/gitlab/embedded/bin/git --git-dir=/var/opt/gitlab/git-data/repositories/@hashed/7b/1a/7b1a278f5abe8e9da907fc9c29dfd432d60dc76e17b0fabab659d2a508bc65c4.git bundle create /var/opt/gitlab/backups/repositories/@hashed/7b/1a/7b1a278f5abe8e9da907fc9c29dfd432d60dc76e17b0fabab659d2a508bc65c4.bundle --all
Ignoring error on klud/projectN - fatal: Unable to create '/var/opt/gitlab/backups/repositories/@hashed/7b/1a/7b1a278f5abe8e9da907fc9c29dfd432d60dc76e17b0fabab659d2a508bc65c4.bundle.lock': No such file or directory
* klud/projectN.wiki ... [SKIPPED]
done
Dumping uploads ...
done
Dumping builds ...
done
Dumping artifacts ...
done
Dumping pages ...
done
Dumping lfs objects ...
done
Dumping container registry images ...
done
Creating backup archive: 1511096852_2017_11_19_10.2.0-rc2_gitlab_backup.tar ... done
Later on, I run a clean-up task gitlab-rake gitlab:clean-up:dirs REMOVE=true
and it removed the @hashed
folder, I don't think this is intented, right?
root@474a07fe0e9e:/# gitlab-rake gitlab:cleanup:dirs REMOVE=true
/var/opt/gitlab/git-data/repositories
Looking for directories to remove...
Removed.../var/opt/gitlab/git-data/repositories/@hashed
As a result all of my projects are gone!
Glad I have some backups.
PS. I know hashed storage is experimental, just letting You guys know what I've found so far.
Describe the OS and the system environment GitLab is installed on (Is it a clean VM, is anything else running on it, etc.)
- Host OS: Ubuntu 16.04
- Docker: 17.09-ce