git/list[1] front-page[2] threads[3] people[4] search[5] about
 

ok to delete tmp_pack file(s)? also, backing up a git repository

From
Adam Monsen <haircut@gmail.com>
Date
May 19, 2010, 23:05 UTC
Message-ID
<loom.20100520T010426-277@post.gmane.org>

I backup my remote git repositories on sf.net using "rsync -a REMOTE LOCAL". I chose rsync instead of clone --mirror/fetch because I wanted hook scripts, "description", and "config" backed up.

I got the following error from my backup cron job:
        rsync: send_files failed to open
        "/mifos/head/objects/pack/tmp_pack_IcK2CZ" (in gitroot):
        Permission denied (13)

So, fine, I can't reach that file. Looks like a temp file--I think I did a CTRL-C during a push, so maybe that's what caused it to be left around. A few questions:

     1. Should I just ignore "objects/pack/tmp_pack_*" file in my rsync
        backup?
     2. Should I shell into sf.net and run "git gc" on the repository?
        or "git repack"? or something else?
     3. Is rsync a bad idea? For instance, is the backup useful even if
        rsync was running while someone was doing a "git push" into the
        repository being backed up?
     4. Anyone have different rsync options to recommend for optimal
        backup of a git repository?

Thank you! -Adam

PS - git rocks... our benefits since migrating from svn are numerous:
* remote folks (UK, India, Africa, etc.) are quite happy with the speed
increase
* branching and merging just works
* examining logs/forensics is much easier and faster
* lots more, but I gotta grab me some lunch
Next: Nicolas Pitre
Message 1 of 3 in “ok to delete tmp_pack file(s)? also, backing up a git repository”
  1. Adam MonsenMay 19, 2010
  2. Nicolas PitreMay 19, 2010
  3. Adam MonsenMay 20, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.