Re: how to backup git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> On Mon, 12 May 2008, Heikki Orsila wrote:
> 
>> On Mon, May 12, 2008 at 06:07:28PM +0100, Johannes Schindelin wrote:
>> 
>>> On Mon, 12 May 2008, Heikki Orsila wrote:
 
>>>> Is there a simple and efficient mechanism for incremental backups?
>>> 
>>> Umm.  "git fetch"?
>>> 
>>> Like I said, it does not get the reflogs, but if you want to back up a 
>>> repository, the safest is to clone once, and fetch later.  Or you 
>>> could set up a remote with the --mirror option, if you want to 
>>> preserve the refs' namespaces.
>> 
>> Preferably some solution that does not require too much understanding of 
>> Git internals so that admins will actually use it, instead of hacking 
>> their own inefficient backup scripts.
>> 
>> Could someone please write a "git-backup" script?-)
> 
> Heikki, why don't you just go with the "git fetch" approach I described?  
> We do not need "git backup" when "git fetch" does already what you want.

I think that bundles (see git-bundle) would be what you want (please
read GitFaq/GitTips/"Git in Nutshell" for explanation and use cases).

"git fetch" (perhaps using bundle) would save state of refs (heads,
remote branches, tags) and object repository.  To save state of
working area and index I think it would be best to use 'git-stash'
before creating backup, and unstash after it; see documentation for
git-stash.  What is left is: reflogs, configuration, hooks, grafts and
shallow, repository local excludes file, repository local attributes
file[*1*].

[*1*] Which is not mentioned in Documentation/repository-layout.txt
-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux