LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-27-2007, 07:59 PM   #1
SethShannon
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Rep: Reputation: 0
How to tar a folder and send it in FTP on another server ?


Hi,

Everything is in the title ;-)

But an important point is that i can ONLY access my server in rescue mode in SSH.

I need to backup my sql bases and the content of /mnt/md7/www/vhosts/domain_name

So i guess there a simple way to tar thoses files in one or several archive and then ftp them to another ftp server, but all using SSH commands ?

Thanks !
 
Old 09-27-2007, 09:02 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,474

Rep: Reputation: 189Reputation: 189
For security you would normally transfer the file(s) over ssh with sftp or scp instead of ftp. If you wanted to backup all the files in domain_name and transfer them to a remote box with ip 192.168.1.103 and login as user "joe" on that box, you would run:

# tar -cvf backup.tar /mnt/md7/www/vhosts/domain_name/ && scp backup.tar joe@192.168.1.103:/home/joe/

At which point you would be prompted for joe's password and then the transfer of your backup archive, backup.tar, would start to joe's home directory. Once the transfer is done, you can remove the archive on the local machine, unless you want to save it:

# rm backup.tar
 
Old 09-28-2007, 02:27 AM   #3
SethShannon
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Worked perfect !

Many thanks for your help !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I uncompress a tar.gz file in a remote server using FTP? Dannt Linux - Networking 7 11-05-2006 05:53 PM
how to zip a folder as tar.gz Dakkar Linux - General 2 01-09-2006 12:51 PM
why does FTP server send local network address in passive mode? edesmarais Linux - Newbie 11 03-16-2005 01:33 AM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 08:31 PM
tar.gz a folder tubby Linux - General 1 08-12-2002 06:04 PM


All times are GMT -5. The time now is 07:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration