certify
07-27-2001, 04:36 AM
Just checking is there a way I can transfer my existing files to my new server with all the chmod intact?
These 2 servers are in catalog.com so it will be faster transfer via these 2 servers rather than I download all of the files back to my PC.
Any help?
Telnet to your new server. Su. Then telnet to your Raq through your new server.
use wget or get and transfer the files over.
Find the directory trees you want to move and make them into a tarball by using the tar command.
Then compress this tarball with your favorite compression utility. This will preserve the directory structure and file permissions and is much more reliable than trying to get all of the files individually.
For more info on tar, see:
http://www.linuxdot.org/nlm/part1/tar.html
Basically to create a compressed tar file
tar -cvfz tarfilename.tar.gz directoryname
this will create a compressed tar ball for you...
then telnet into your new machine, from the command line ftp over to the old box and fetch the tar ball.
After getting the file, go to the exact place in your filesystem where you want the files to be placed....
then un tar the file (tar -xfvz tarfilename.tar). This will expand the tar file into the new directory structure -- everything below it will be identical to the old machine.
Originally posted by huck
After getting the file, go to the exact place in your filesystem where you want the files to be placed....
then un tar the file (tar -xfvz tarfilename.tar). This will expand the tar file into the new directory structure -- everything below it will be identical to the old machine.
Not quite. As he mentioned before, he wants ownership to be preserved - that is very important. Therefore he will need to use this tar command:
tar -xvpzf tarfilename.tar
Also note that you must put the "f" parameter last, otherwise the command do not work.
Please be aware, that there is a difference in transfering ownership numerical or by user names (i.e. if you users have got new uids on the new server, you'll need to watch out).
I will strongly recommend using scp to transfer the files (and thus avoiding the tar commands). That is both fast, secure and easy. If you have a bad network connection - consider using rsync in combination with scp.
<<MOD EDIT:>>
You may not post URLs in your posts. Please set up a signature in your profile.
<</MOD EDIT>>
certify
07-27-2001, 11:21 AM
Forgive my ignorance but what is scp?
atiep
07-27-2001, 11:29 AM
scp: secure copy
scp -r /sourcedir user@destination-host:/destination-directory
----
scp - secure copy (remote file copy program)
SYNOPSIS
scp [-pqrvC46] [-S program] [-P port] [-c cipher] [-i identity_file] [-o
option] [[user@]host1:]file1 [...] [[user@]host2:]file2
DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data
transfer, and uses the same authentication and provides the same security
as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if
they are needed for authentication.
Any file name may contain a host and user specification to indicate that
the file is to be copied to/from that host. Copies between two remote
hosts are permitted.
--
full detail just type "man scp" ... without quote sign.. :D
hope it help...
certify
07-29-2001, 02:18 PM
Thanks! :)
I'll be doing the transfer this week.
certify
07-31-2001, 11:19 AM
Originally posted by huck
Find the directory trees you want to move and make them into a tarball by using the tar command.
Then compress this tarball with your favorite compression utility. This will preserve the directory structure and file permissions and is much more reliable than trying to get all of the files individually.
For more info on tar, see:
http://www.linuxdot.org/nlm/part1/tar.html
Basically to create a compressed tar file
tar -cvfz tarfilename.tar.gz directoryname
this will create a compressed tar ball for you...
then telnet into your new machine, from the command line ftp over to the old box and fetch the tar ball.
After getting the file, go to the exact place in your filesystem where you want the files to be placed....
then un tar the file (tar -xfvz tarfilename.tar). This will expand the tar file into the new directory structure -- everything below it will be identical to the old machine.
I got this error when I try to tar it. What should I do??
web/sun/index.shtml
web/sun/java2/
web/sun/java2/books.shtml
web/sun/java2/cramnotes.shtml
web/sun/java2/exam.shtml
web/sun/java2/index.shtml
web/sun/java2/java2-cramnotes.pdf
web/dump.sql
web/z
tar: Error exit delayed from previous errors
[admin@www home]$ ls
tar: Error exit delayed from previous errors
Originally posted by certify
I got this error when I try to tar it. What should I do??
tar: Error exit delayed from previous errors
Try checking if you have run out of disk space?