hg clone doesn't really clone
Hudes, Dana
hudesd at hra.nyc.gov
Mon Aug 10 18:54:56 CDT 2009
I haven't got mercurial up just yet on my solaris host (busy in
dependency building...the prebuilt asciidoc isn't good enough and the
current wants xmlto and -that- isn't pleased with the solaris 10
getopt...which is deprecated). Anyway, to ensure that I have a
consistent view of the repository I can shutdown apache2, snapshot (I'm
using ZFS) the filesystem(s), and restart apache. Netbackup does do
some consistency assurance but not really it's just a glorified tar not
nearly as reliable as a ZFS snapshot (ZFS is a database that thinks it's
a filesystem -- you wouldn't just write a database to a tar you'd dump
it first).
-----Original Message-----
From: mercurial-bounces at selenic.com
[mailto:mercurial-bounces at selenic.com] On Behalf Of Nick
Sent: Monday, August 10, 2009 7:47 PM
To: mercurial at selenic.com
Subject: hg clone doesn't really clone
I'm trying to setup reliable backups for a mercurial repository. From
what I understand, the best way to do this is to do an "hg clone" of the
repository, and then backup the cloned repository using regular means.
However, in testing, hg clone isn't true to it's name.
The original repository looks like this at the top level:
# ls -al
total 12
drwxr-x--- 3 apache apache 4096 Aug 10 13:57 .
drwxr-x--- 3 root apache 4096 Aug 10 13:57 ..
drwxr-xr-x 3 apache apache 4096 Aug 10 14:17 .hg # du -sh .
422M .
However, the "cloned" repository looks like this:
# ls -al
total 59112
drwxr-xr-x 5 apache apache 4096 Aug 10 16:24 .
drwxr-xr-x 3 root root 4096 Aug 10 16:23 ..
drwxr-xr-x 3 apache apache 4096 Aug 10 16:24 .hg
drwxr-xr-x 22 apache apache 4096 Aug 10 16:24 linux-2.6.30.4
-rw-r--r-- 1 apache apache 59416037 Aug 10 16:23 linux-2.6.30.4.tar.bz2
drwxr-xr-x 2 apache apache 1028096 Aug 10 16:24 lots-of-files # du -sh
.
872M .
It seems to be adding in an extra "working" copy of the files in the
repo. Is there any way to get a real clone? It seems silly to waste
space in this fashion. I could do the clone and then manually delete
the files at the root, but that seems really stupid and inefficient.
If sheep were cloned in this way, the resulting sheep would end up with
a couple of extra legs coming out if it's head and would probably be put
down.
_______________________________________________
Mercurial mailing list
Mercurial at selenic.com
http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list