Is it possible to compress several folders and upload to another location (ftp) remotely?

I've a GoDaddy account with SSH access, and I'd like to create a backup (zip all folders) and upload directly from GoDaddy to my new host FTP, is it possible? Can you please provide the commands for those operations?

Many thanks!!

link|improve this question

60% accept rate
feedback

1 Answer

up vote 0 down vote accepted

Lots of ways to go about this, but here's a general example:

Compress the public_html directory, or whichever folder contains your site:

tar czvf site.tar.gz public_html/

login to the remote FTP server (Login process may differ depending on software used - host and credentials will change obviously, swap localhost with your remote ftp server):

ftp localhost
Name (localhost:john): john
331 User john okay, need password.
Password:
KERBEROS_V4 set as authentication type
230-You are user #12 of 50 simultaneous users allowed.

upload your files:

put site.tar.gz

log out of the FTP server:

bye
link|improve this answer
It would be a lot better to use sftp for this, if you care about neighbours armed with tcpdump. – grawity Dec 14 '09 at 14:10
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.