Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2007-08-17 05:56:32
Size: 320
Comment:
Revision 8 as of 2008-12-05 01:40:56
Size: 1117
Editor: ArneBab
Comment: replaced 'hg bundle --base null' with 'hg bundle -a'
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
backing up of a mercurial repository can be done: == Backing up a Repository ==
Line 3: Line 3:
 * regular cloning (This is a summary of a thread on the [:MailingLists:mailing list] around 2007-08-11. backing up of a Mercurial [:Repository:repository] can be done:

 * regular cloning - only if you check in regularly
   * you may use mq init -c to also allow backup of your local changes (see MqTutorial)
Line 5: Line 8:
   * mpm: there is a "potential not serious race" when somebody is pushing at the same time to the rep    * mpm: there is a "potential not serious race" when somebody is pushing at the same time to the repo
   * mpm: There will be a partial commit in progress during the backup. The repo will contain part of the commit and won't pass verify. Doing a pull of the last good revision will repair it.
Line 7: Line 11:

----

As noted on [:CreateBundleOfAllChanges], a compressed version of a repository may be created by using {{{hg bundle}}}:

{{{
$ hg bundle --all project.hg
}}}

Of course, such a full bundle file ("project.hg" in our example) of a repository does not contain extra repo-files like "hgrc" (these would need to be backed-up separately).

Backing up a Repository

(This is a summary of a thread on the [:MailingLists:mailing list] around 2007-08-11. backing up of a Mercurial [:Repository:repository] can be done:

  • regular cloning - only if you check in regularly
    • you may use mq init -c to also allow backup of your local changes (see MqTutorial)

  • copy the filesystem
    • mpm: there is a "potential not serious race" when somebody is pushing at the same time to the repo
    • mpm: There will be a partial commit in progress during the backup. The repo will contain part of the commit and won't pass verify. Doing a pull of the last good revision will repair it.
    • mpm: if the filesystem is able to create snapshots (like zfs) there is no race. take a snapshot, then back it up


As noted on [:CreateBundleOfAllChanges], a compressed version of a repository may be created by using hg bundle:

$ hg bundle --all project.hg

Of course, such a full bundle file ("project.hg" in our example) of a repository does not contain extra repo-files like "hgrc" (these would need to be backed-up separately).

BackUp (last edited 2009-05-19 19:31:05 by localhost)