git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rsync a *bunch* of git repos
@ 2012-01-10 21:15 Jason
  2012-01-10 21:24 ` Seth Robertson
  2012-01-11  8:01 ` Andreas T.Auer
  0 siblings, 2 replies; 8+ messages in thread
From: Jason @ 2012-01-10 21:15 UTC (permalink / raw)
  To: git

All,

I have a home directory with a lot of git repos in it.  Possibly over a
hundred.  This is a good thing.  :-)  However, I'm in the process of
changing OS's and need to move my home directory out of my root
partition into its own partition.

The nuts and bolts of this aren't difficult, the problem is I don't have
a complete understanding of how git stores data.  I've heard in the
past that it uses a lot of hardlinks and softlinks.  I need to make
sure, that once I transfer the data, and reboot the machine with the new
partition mounted under /home, that all my git repos will be okay.

Going through the git repos one by one would be long and prone to
errors, so I'm looking at alternatives.  Does this look ok?

## From single user mode, or live cd
$ su -
# mkfs.ext4 /dev/sda3
# mount /dev/sda3 /mnt/home
# rsync --progress -avu /home/ /mnt/home/
# umount /mnt/home
# mv /home /home.orig
# mkdir /home

### Sanity check?
# mount /dev/sda3 /home
# rsync -avun /home.orig/ /home/

That'll check that rsync thinks things are ok, but what about git?  Is
there a git sanity check I could run to detect that three hardlinks
still point to the same inode?

One alternative may be to boot to a live CD, delete everything from the
root partition except /home, then mv /home/* -> / .  Basically, use my
current root partition as the new /home partition.

thx,

Jason.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-24 14:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 21:15 rsync a *bunch* of git repos Jason
2012-01-10 21:24 ` Seth Robertson
2012-01-10 22:00   ` Philip Oakley
2012-01-10 22:30     ` Junio C Hamano
2012-01-11 13:22       ` Sergio
2012-01-11 16:52         ` Neal Kreitzinger
2012-01-24 14:11   ` Jason
2012-01-11  8:01 ` Andreas T.Auer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).