Hello,
The new server is in and I am about to attempt the file transfers. I have NEVER attempted this and want to do it right the first time.
Reading the man pages for cp and scp it looks as if the -a switches are different. Are they? I want/am going to transfer files/directories across the local network. Should I work from the new machine or the old? What files are machine dependent? In other words, what files, if any, should not be copied because of hardware differences?
Sorry for all the seemingly stupid questions but as I said, I have never undertaken this before.
TIA
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
Hello,
The new server is in and I am about to attempt the file transfers. I have NEVER attempted this and want to do it right the first time.
Reading the man pages for cp and scp it looks as if the -a switches are different. Are they? I want/am going to transfer files/directories across the local network. Should I work from the new machine or the old? What files are machine dependent? In other words, what files, if any, should not be copied because of hardware differences?
Sorry for all the seemingly stupid questions but as I said, I have never undertaken this before.
man rsync
rsync -avzP -e ssh ipoldserver:/path/to/directory /path/to
Will do a good job of moving / backing up even ".*" files (Hidden files) On source it is /path/to/directory and on target is is /path/to the directory is cretaed on target along with all subdirectories. If you run it from old server you can
rsync -avzP -e ssh /path/to/directory ipnewserver:/path/to
Also if for any reason you have to kill rsync in between ( power off or run out for quicky ;-) or ...) restart when you are back and it will continue from where you let off. HTH -- Sudev Barar Learning Linux
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Sudev Barar Sent: Saturday, March 11, 2006 7:32 PM To: CentOS mailing list Subject: Re: [CentOS] Moving files to new server
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
Hello,
The new server is in and I am about to attempt the file
transfers. I
have NEVER attempted this and want to do it right the first time.
Reading the man pages for cp and scp it looks as if the -a switches are different. Are they? I want/am going to transfer files/directories across the local network. Should I work from the new machine or the old? What files are machine dependent?
In other
words, what files, if any, should not be copied because of
hardware differences?
Sorry for all the seemingly stupid questions but as I said, I have never undertaken this before.
man rsync
rsync -avzP -e ssh ipoldserver:/path/to/directory /path/to
Will do a good job of moving / backing up even ".*" files (Hidden files) On source it is /path/to/directory and on target is is /path/to the directory is cretaed on target along with all subdirectories. If you run it from old server you can
rsync -avzP -e ssh /path/to/directory ipnewserver:/path/to
Also if for any reason you have to kill rsync in between ( power off or run out for quicky ;-) or ...) restart when you are back and it will continue from where you let off. HTH
Thanks for your response!
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied something in /etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
TIA
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied something in /etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
I would not copy /etc since it stores all setting files. Most likely it is /etc/fsatb file that is creating problems as your new system is looking for drives/partitions/lables that probably do not exists or are named differently on new system.
I would be selective in coprying /var too.
-- Sudev Barar Learning Linux
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Sudev Barar Sent: Saturday, March 11, 2006 8:13 PM To: CentOS mailing list Subject: Re: [CentOS] Moving files to new server
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied
something in
/etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
I would not copy /etc since it stores all setting files. Most likely it is /etc/fsatb file that is creating problems as your new system is looking for drives/partitions/lables that probably do not exists or are named differently on new system.
I would be selective in coprying /var too.
That was my thinking also. I made a backup copy of /etc/fstab but it would not let me overwrite the fstab that was copied. Unfortunately, I need most of the config files in that directory and sub-directories. Knowing which ones to copy and not to copy could be a very lengthy experience.
What should I be careful about coping in /var?
Thanks!!
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied
something in
/etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
I would not copy /etc since it stores all setting files. Most likely it is /etc/fsatb file that is creating problems as your new system is looking for drives/partitions/lables that probably do not exists or are named differently on new system.
I would be selective in coprying /var too.
That was my thinking also. I made a backup copy of /etc/fstab but it would not let me overwrite the fstab that was copied. Unfortunately, I need most of the config files in that directory and sub-directories. Knowing which ones to copy and not to copy could be a very lengthy experience.
Can you rebuild the new machine? If you can then make sure that the orders of partitions is same as the old one and so are the lables and drive is also same (hda or hdb or sda...), variations in size should not be problem. Alternatively (and much better) why not edit the fstab file instead of overwriting? This is best done with something like Knoppix boot and not with running OS.
What should I be careful about coping in /var?
Normally I would say copy mail spool databases web root but leave everything else. But this highly depend on what you were running. -- Sudev Barar Learning Linux
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Sudev Barar Sent: Saturday, March 11, 2006 8:30 PM To: CentOS mailing list Subject: Re: [CentOS] Moving files to new server
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied
something in
/etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
I would not copy /etc since it stores all setting files.
Most likely
it is /etc/fsatb file that is creating problems as your
new system
is looking for drives/partitions/lables that probably do
not exists
or are named differently on new system.
I would be selective in coprying /var too.
That was my thinking also. I made a backup copy of
/etc/fstab but it
would not let me overwrite the fstab that was copied.
Unfortunately,
I need most of the config files in that directory and
sub-directories.
Knowing which ones to copy and not to copy could be a very
lengthy experience.
Can you rebuild the new machine? If you can then make sure that the orders of partitions is same as the old one and so are the lables and drive is also same (hda or hdb or sda...), variations in size should not be problem.
I noticed that a fresh install of CentOS uses LVM. If I remember correctly, I had a /boot and a 2 - LVM's. My old system doesn't use that. I didn't see an option in the install process that would let me do otherwise (the old way).
Alternatively (and much better) why not edit the fstab file instead of overwriting? This is best done with something like Knoppix boot and not with running OS.
I did an install of Redhat _years_ ago and have only had to upgrade. I never had to use this feature. I don't have a clue what it is.
Guess I'm screwed.........
Thanks!!
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
Alternatively (and much better) why not edit the fstab file instead of overwriting? This is best done with something like Knoppix boot and not with running OS.
I did an install of Redhat _years_ ago and have only had to upgrade. I never had to use this feature. I don't have a clue what it is.
Guess I'm screwed.........
Knoppix is a live cd distro of linux that runs off the memory. After running knoppix (or any other live cd) you can mount and edit files in /etc and there after boot in regular way.
If you are ready to throw in your hat then...... else try with single user boot. I am not fully sure but when you boot type in linux singe ( better google for it) and then do needed changes. -- Sudev Barar Learning Linux
On 12/03/06, Sudev Barar sbarar@gmail.com wrote:
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
Alternatively (and much better) why not edit the fstab file instead of overwriting? This is best done with something like Knoppix boot and not with running OS.
I did an install of Redhat _years_ ago and have only had to upgrade. I never had to use this feature. I don't have a clue what it is.
Guess I'm screwed.........
Knoppix is a live cd distro of linux that runs off the memory. After running knoppix (or any other live cd) you can mount and edit files in /etc and there after boot in regular way.
Or can you down load "damn Small Linux" which is also a live linux cd (~50mb) boot off it and do the same. -- Sudev Barar Learning Linux
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Sudev Barar Sent: Saturday, March 11, 2006 8:46 PM To: CentOS mailing list Subject: Re: [CentOS] Moving files to new server
On 12/03/06, Thomas E Dukes edukes@alltel.net wrote:
Alternatively (and much better) why not edit the fstab
file instead
of overwriting? This is best done with something like
Knoppix boot
and not with running OS.
I did an install of Redhat _years_ ago and have only had to
upgrade.
I never had to use this feature. I don't have a clue what it is.
Guess I'm screwed.........
Knoppix is a live cd distro of linux that runs off the memory. After running knoppix (or any other live cd) you can mount and edit files in /etc and there after boot in regular way.
If you are ready to throw in your hat then...... else try with single user boot. I am not fully sure but when you boot type in linux singe ( better google for it) and then do needed changes.
No, I don't give up that easily. I did try the rescue mode but it didn't/wouldn't mount the needed filesystem that has /etc.
I'm still re-installing. I hate to have to hand-pick the files in /etc but I guess to make this work, I'll have to.
Thanks
On Sat, 2006-03-11 at 19:08, Thomas E Dukes wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied something in /etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
Unless the source and target machines are identical, software and hardware-wise, I'd only copy /home. If you want to change the password file to a different style of encryption you'll have to add all the users again and specify identical uid and gid numbers. If you can keep the old encryption, you can copy the contents of the old /etc/passwd and /etc/shadow files for users with uids over 500 and paste into the corresponding new files. Likewise for the contents of /etc/group and /etc/gshadow for the user-related groups. Use the other files in /etc only as a guide to setting up identical configurations - the contents have changed across versions. Just before switching the new machine into production, shut down the mail service on the old one and copy over /var/spool/mail. Also look under /var/spool/cron for any jobs that should be set up (I don't think I'd copy these blindly). You might have undelivered outgoing mail in /var/spool/mqueue. If you rename the old machine you might just let it continue the delivery retries - or you can copy the contents to the new server but don't do both.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Les Mikesell Sent: Saturday, March 11, 2006 8:58 PM To: CentOS mailing list Subject: RE: [CentOS] Moving files to new server
On Sat, 2006-03-11 at 19:08, Thomas E Dukes wrote:
The rsync works fine. I used it to copy /home /var and /etc to the new server. But something went wrong. I think I copied
something in
/etc I shouldn't have. The system won't mount the drive. I am currently re-installing CentOS.
Any idea of what I SHOULDN'T copy?
Unless the source and target machines are identical, software and hardware-wise, I'd only copy /home. If you want to change the password file to a different style of encryption you'll have to add all the users again and specify identical uid and gid numbers. If you can keep the old encryption, you can copy the contents of the old /etc/passwd and /etc/shadow files for users with uids over 500 and paste into the corresponding new files. Likewise for the contents of /etc/group and /etc/gshadow for the user-related groups. Use the other files in /etc only as a guide to setting up identical configurations - the contents have changed across versions. Just before switching the new machine into production, shut down the mail service on the old one and copy over /var/spool/mail. Also look under /var/spool/cron for any jobs that should be set up (I don't think I'd copy these blindly). You might have undelivered outgoing mail in /var/spool/mqueue. If you rename the old machine you might just let it continue the delivery retries - or you can copy the contents to the new server but don't do both.
They should be fairly close software-wise. Both are running CentOS 4.2. There may be a few packages missing on the new machine such as mailscanner, f-prot, etc. Hardware-wise, you're looking at a P3-450, 384MB RAM and a 20GB HD v. P4-3Mhz, 1GB RAM and 80GB HD.
I think the 'fresh' install of CentOS created an LVM filesystem which I don't have on the old machine. I copied /etc passwd, groups, shadow and gshadow as you suggested in a previous post about a week ago. That worked fine. I copied /home, /var, /root using rsync -avz. I think /etc got me, specifically /etc/fstsb. I made a copy of fstab on the new machine but it wouldn't let me copy back over it after the transfer. I'll be sure not to do that again. But I'm going to need /etc/httpd, /etc/sendmail, etc, etc, etc... (no pun intended).
The system is still d/l 4.2 updates so I may have to continue this in the AM. That will be a good stopping point for today. Been at this since noon and I'm whipped.
Thanks for everyone's help!!!
On Sat, 2006-03-11 at 20:32, Thomas E Dukes wrote:
I think the 'fresh' install of CentOS created an LVM filesystem which I don't have on the old machine. I copied /etc passwd, groups, shadow and gshadow as you suggested in a previous post about a week ago. That worked fine. I copied /home, /var, /root using rsync -avz. I think /etc got me, specifically /etc/fstsb. I made a copy of fstab on the new machine but it wouldn't let me copy back over it after the transfer. I'll be sure not to do that again. But I'm going to need /etc/httpd, /etc/sendmail, etc, etc, etc... (no pun intended).
Yes, /etc/fstab would be much different on a new LVM based install than an old install with version-level upgrades. Likewise for many other config files. You should probably copy the old files over to some other location on the new machine, diff against the default versions and edit in the parts you need. Otherwise you may be missing some new settings or different defaults that have been added to the new versions.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Les Mikesell Sent: Saturday, March 11, 2006 10:33 PM To: CentOS mailing list Subject: RE: [CentOS] Moving files to new server
On Sat, 2006-03-11 at 20:32, Thomas E Dukes wrote:
I think the 'fresh' install of CentOS created an LVM
filesystem which
I don't have on the old machine. I copied /etc passwd,
groups, shadow
and gshadow as you suggested in a previous post about a week ago. That worked fine. I copied /home, /var, /root using rsync -avz. I think /etc got me, specifically /etc/fstsb. I made a copy
of fstab on
the new machine but it wouldn't let me copy back over it after the transfer. I'll be sure not to do that again. But I'm
going to need
/etc/httpd, /etc/sendmail, etc, etc, etc... (no pun intended).
Yes, /etc/fstab would be much different on a new LVM based install than an old install with version-level upgrades. Likewise for many other config files. You should probably copy the old files over to some other location on the new machine, diff against the default versions and edit in the parts you need. Otherwise you may be missing some new settings or different defaults that have been added to the new versions.
Success!!!!
Thanks everyone!!