gsalcedo
asked on
Transfer directories and files safely by using the "tar" command.
Hi,
I am in the process of transferring directories and files from a old Sun server to a new Sun Server and decommision the old server. In general, the new Sun server will be identical in configuration to the old Sun server. How do I transfer all of the directories and files safely to the new Sun server by using the "tar" command? What configuration do I need to edit on the new server so that the transition will go smoothly?
Thank you very much for your help.
I am in the process of transferring directories and files from a old Sun server to a new Sun Server and decommision the old server. In general, the new Sun server will be identical in configuration to the old Sun server. How do I transfer all of the directories and files safely to the new Sun server by using the "tar" command? What configuration do I need to edit on the new server so that the transition will go smoothly?
Thank you very much for your help.
Take a look at this PAQ and see if this doesn't contain some useful ideas (mebbe not the one I adopted, but some of the others suggested) -->https://www.experts-exchange.com/questions/21003342/Migrating-data-from-one-server-to-another.html
ASKER
Hi PsiCop,
Thank you for the link to the similar task. In the process of transferring users' home directories by using the tar command, I would receive an error message "tar: tarfile must be specified with 'f' function modifier." Here is the command that I used ..
tar cf- /export | ssh <target servername> "tar xvf -"
The users' profiles are located under the /export/home directory on the <source server>.
Please point out what I did wrong. Currently, the <source server> is being used . If I were to use the "tar" command, would that transfer the directories and files over to the <target server> and remove those tarred directory and files from the <source server>? If it does, what can I do to eliminate any distraction while the <source server> is still being used?
Thank you.
Thank you for the link to the similar task. In the process of transferring users' home directories by using the tar command, I would receive an error message "tar: tarfile must be specified with 'f' function modifier." Here is the command that I used ..
tar cf- /export | ssh <target servername> "tar xvf -"
The users' profiles are located under the /export/home directory on the <source server>.
Please point out what I did wrong. Currently, the <source server> is being used . If I were to use the "tar" command, would that transfer the directories and files over to the <target server> and remove those tarred directory and files from the <source server>? If it does, what can I do to eliminate any distraction while the <source server> is still being used?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
The "tar" command worked great. Does anyone know the configuration files that I need to transfer over to have the <target server> look identical to the <source server>?
Thank you
The "tar" command worked great. Does anyone know the configuration files that I need to transfer over to have the <target server> look identical to the <source server>?
Thank you
You kinda need to be careful here.
What kinda box are you moving off of and what is the box you are moving to ?
What kinda box are you moving off of and what is the box you are moving to ?
Depends on your definition of "identical". You obviously don't want to transfer device files and suchlike over. Are you mostly interested in stuff like user accounts and network configuration?
Taking over /etc will get most of the stuff, but it all depends on how specific you want to be and what applications you have running.
Taking over /etc will get most of the stuff, but it all depends on how specific you want to be and what applications you have running.
ASKER
The only specifics that I want to transfer is the identity of the <source server>, such as the IP address and hostname. I do not want to transfer any physical description, such as the disk partition.
If that's all you want, then just copy:
/etc/inet/hosts
/etc/inet/netmasks
/etc/hostname.*
/etc/inet/hosts
/etc/inet/netmasks
/etc/hostname.*
If you just want to change "move" the old server to the new one, and they are not the same
model of Sun box, have a look at my answer in: http:Q_20537122.html
PS: the new server will use the old server name and IP in this case. I wrote that procedure
a few years ago, and have done it a few times, works for me.
model of Sun box, have a look at my answer in: http:Q_20537122.html
PS: the new server will use the old server name and IP in this case. I wrote that procedure
a few years ago, and have done it a few times, works for me.
ASKER
Hi,
Tintin ... I have transferred those files over, but I would would get errors after rebooting the <replacement server> while the <source server> is turned off. The error message that I would get is "configuring IPV4 ifconfig: <old hostname> : bad address hme0." The IPV6 configuring is fine and it refers to it with the <new hostname>. When the system completely boots up and after I log in, I notice that it sees itself as <new hostname>. The network configuration did not setup because of the IPV4 issue. Do you happen to have an idea on what the issue is and how I can resolve it to have the server up and running?
yuzh... Thank you for your advise. Since I do not have a tape drive available to physically connect to any of the servers, I am not able to run the "dump" command. That is the reason why I went with the "tar" path.
Thank you.
Tintin ... I have transferred those files over, but I would would get errors after rebooting the <replacement server> while the <source server> is turned off. The error message that I would get is "configuring IPV4 ifconfig: <old hostname> : bad address hme0." The IPV6 configuring is fine and it refers to it with the <new hostname>. When the system completely boots up and after I log in, I notice that it sees itself as <new hostname>. The network configuration did not setup because of the IPV4 issue. Do you happen to have an idea on what the issue is and how I can resolve it to have the server up and running?
yuzh... Thank you for your advise. Since I do not have a tape drive available to physically connect to any of the servers, I am not able to run the "dump" command. That is the reason why I went with the "tar" path.
Thank you.
gsalcedo - what kinda box are you moving off of and what kinda are you moving to ?
You probably have different network adapters.
At a guess, I would say the new server has eri0 instead of hme0, in which case just rename /etc/hostname.hme0 to /etc/hostname.eri0
At a guess, I would say the new server has eri0 instead of hme0, in which case just rename /etc/hostname.hme0 to /etc/hostname.eri0
That's why you should read the LINK in my comment http:Q_20537122.html, now you need
to use the procedure to fix it up
at least you need to:
mv
hostname.hme0 hostname.interfacename
You might have to worry about the Graphic card as well.
to use the procedure to fix it up
at least you need to:
mv
hostname.hme0 hostname.interfacename
You might have to worry about the Graphic card as well.
ASKER
Hi,
I actually had to change the hostname in the hostname.hme0 file. After that, it worked. Although the transfer of files went well, I am encountering an issue with a daemon that is supposed to work on the current server (<replacement server>). On the old server (<source server>) there is a daemon called "tcpd" that is supposed to work when updating the IPs on the Cisco router. On the <source server> I noticed that the "tcpd" is located in the /usr/local/bin directory, according to the inetd.conf file. On the <replacement server>, the "tcpd" file is located in the /usr/local/etc directory. Does anyone know about the procedure that I need to take to setup the "tftpboot"(tcpd) to work properly?
Thank you
I actually had to change the hostname in the hostname.hme0 file. After that, it worked. Although the transfer of files went well, I am encountering an issue with a daemon that is supposed to work on the current server (<replacement server>). On the old server (<source server>) there is a daemon called "tcpd" that is supposed to work when updating the IPs on the Cisco router. On the <source server> I noticed that the "tcpd" is located in the /usr/local/bin directory, according to the inetd.conf file. On the <replacement server>, the "tcpd" file is located in the /usr/local/etc directory. Does anyone know about the procedure that I need to take to setup the "tftpboot"(tcpd) to work properly?
Thank you