Copying hard-linked tree structure
Max Kipness
mkipness at geniant.com
Wed Jan 7 21:18:40 GMT 2004
> > > I have a tree structure on one server similar to the following:
> > >
> > > /Current
> > > /01-04-2003
> > > /01-03-2003
> > >
> > > etc...
> > >
> > > /Current holds the most recent rsynced data, and the date
> > > directories are created with cp -al on a daily basis so they are
> > > hard-linked. I'm going back 60 days.
> > >
> > > The question is how can I move this entire structure to a
> new server
> > > and preserve the links from the date directories to the /Current
> > > directory?
> >
> > Well, I ended up rsyncing the root directory to the new server with
> > the -H option and it seemed to work. I have 30 directories
> for 30 days
> > of rotating backups.
> >
> > However, I had a dir called /Current that had 12Gbs and
> then all the
> > /date directories had 120mb, 60mb, etc...the daily changes that
> > occurred. Well now the directory called /01-01-2004 has 12Gb and
> > /Current has like 100mb. I guess /01-01-2004 went first do
> to sorting.
>
> It has to do with the tool you are using to measure them.
>
> > Anyway to change /Current back as the real directory? Or
> does it even
> > matter?
>
> What do you man "real". With hardlinks all links for an
> inode are equal.
I'm using du --max-depth=1 -h on the root dir.
The actual file(s) has to be stored in some directory, right? And then
the hard links point to this directory. Well they are all pointing to
/01-01-2004 instead of /Current.
Max
More information about the rsync
mailing list