Forum Moderators: bakedjake

Message Too Old, No Replies

ftp entire folder shell access

         

jackvull

12:37 am on Jun 21, 2006 (gmt 0)

10+ Year Member



Hi
I have shell access to my server and would like to ftp an entire folder over to another server.
Is it possible to tarnsfer an entire directory or does each file have to be done individually?

jatar_k

12:42 am on Jun 21, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you can tar the directory and then gzip it, then move that

Citrus

9:24 pm on Jun 21, 2006 (gmt 0)

10+ Year Member



You could use secure copy having telneted into the server which you want the folder on, issue the command:

scp -rp admin@[FQDN OF SERVER 1]:/www/* /www/

Exchange "admin" for your username on the server you are copying from.
You will be prompted for a password for that user and the the folder and file will be transfered from www on the first server to www on the second maintaining the same permissions.

Citrus

9:30 pm on Jun 21, 2006 (gmt 0)

10+ Year Member



An alternative is a Tar Pipe:

tar czf - directory ¦ ssh user@newserver.co.uk tar xzf - -C /directory/on/new/server

Initiated from the server you wish to transfer from.