Hope this isnt' too off topic... 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? Thanks, Max
Hope this isn't' too off topic... 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? Thanks, Max
On Tue, Jan 06, 2004 at 03:34:49AM -0600, Max Kipness wrote:> Hope this isnt' too off topic... > > 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?You can either copy the entire structure at once with a tool that preserves hard links or it may be possible to use rsync --link-dest to move one at a time. Myself, i'd use cpio over an ssh pipe. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
> 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. Anyway to change /Current back as the real directory? Or does it even matter? Thanks, Max
> > > 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