how to git repo project archive ?

38 views
Skip to first unread message

Guy Levkowitz

unread,
Oct 5, 2025, 3:30:22 AM (3 days ago) Oct 5
to Repo and Gerrit Discussion
Hey
what is the best way to archive git project repo

we have lots of repos(projects)  that are old and we want to archive  them (as there is no use of them).

is it just move them from the 
 basePath = /git
to anther folder like: /git_archive ? 

or should we need to do some gerrit command actions ? 


BR

Guy



Daniele Sassoli

unread,
Oct 5, 2025, 3:43:40 PM (3 days ago) Oct 5
to Repo and Gerrit Discussion
On Sunday, 5 October 2025 at 00:30:22 UTC-7 sil...@gmail.com wrote:
Hey
what is the best way to archive git project repo

we have lots of repos(projects)  that are old and we want to archive  them (as there is no use of them).

is it just move them from the 
 basePath = /git
to anther folder like: /git_archive ? 

In principle, yeah, I believe so, in the past I've simply compressed the git folder and moved it to somewhere
more suitable. 
I assume you'll need to reindex the project list and it might be a good idea to place those projects in
read-only mode if they aren't already.

The nice thing about NoteDB is that by doing this you'll also be keeping all the review history.

Rikard Almgren

unread,
Oct 6, 2025, 4:52:39 AM (2 days ago) Oct 6
to Repo and Gerrit Discussion

You can also look at using the Delete-Project plugin and the ArchiveDeletedRepos setting.
It doesn't compress them, but it does provide a convenient timestamp and SSH command.

Matthias Sohn

unread,
Oct 6, 2025, 6:52:59 AM (2 days ago) Oct 6
to Rikard Almgren, Repo and Gerrit Discussion
On Mon, Oct 6, 2025 at 10:52 AM Rikard Almgren <rika...@axis.com> wrote:


On Sunday, 5 October 2025 at 21:43:40 UTC+2 Daniele Sassoli wrote:
On Sunday, 5 October 2025 at 00:30:22 UTC-7 sil...@gmail.com wrote:
Hey
what is the best way to archive git project repo

we have lots of repos(projects)  that are old and we want to archive  them (as there is no use of them).

is it just move them from the 
 basePath = /git
to anther folder like: /git_archive ? 

In principle, yeah, I believe so, in the past I've simply compressed the git folder and moved it to somewhere
more suitable. 
I assume you'll need to reindex the project list and it might be a good idea to place those projects in
read-only mode if they aren't already.

The nice thing about NoteDB is that by doing this you'll also be keeping all the review history.

I think unarchiving an old git repository may then require it to run noteDB migrations if the noteDB schema changed
after the repository was archived outside of a gerrit server.
 
You can also look at using the Delete-Project plugin and the ArchiveDeletedRepos setting.
It doesn't compress them, but it does provide a convenient timestamp and SSH command.

I guess compressing a well gc'ed git repo doesn't buy you much since git pack files are already compressed. 


or should we need to do some gerrit command actions ? 


BR

Guy



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/933a952d-7221-4463-8c87-cea1bc0715e5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages