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

Re: backup git repo on every commit

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 13, 2009, 18:18 UTC
Message-ID
<20091013181813.GY9261@spearce.org>
In-Reply-To
<194a2c240910131114q19b6c822t5806d20005341cb4@mail.gmail.com>
Israel Garcia <igalvarez@gmail.com> wrote:
> BTW, is there any git-dump or git-backup command to do some kind of
> backup I'm looking for?

No, you backup git by making a clone. E.g. `git clone --bare`. Since this leaves you with a directory, you need to then perhaps use some sort of file combiner tool like tar or zip to produce a single file for backup to tape.

You can incrementally update that backup clone using git push to write into it, or you can just blow it away and recreate it each time you make a backup.

One could also use `git bundle` to create backup file that had
everything packaged in one neat file, but this can be slightly
harder to work with since a bundle is not a git repository.
 
-- 
Shawn.
Previous: Israel GarciaNext: Christian Himpel
Message 12 of 14 in “backup git repo on every commit”
  1. Israel GarciaOct 12, 2009
  2. Christian HimpelOct 12, 2009
  3. Shawn O. PearceOct 12, 2009
  4. Israel GarciaOct 12, 2009
  5. Shawn O. PearceOct 12, 2009
  6. Israel GarciaOct 12, 2009
  7. Israel GarciaOct 13, 2009
  8. Shawn O. PearceOct 13, 2009
  9. Israel GarciaOct 13, 2009
  10. Shawn O. PearceOct 13, 2009
  11. Israel GarciaOct 13, 2009
  12. Shawn O. PearceOct 13, 2009
  13. Christian HimpelOct 12, 2009
  14. Shawn O. PearceOct 12, 2009

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.