LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-15-2009, 08:12 AM   #1
mbarne
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
backup, tar and upload ftp : help


Hello,

I tried to backup my account using tar and upload it through ftp using a pipe, as I do not have enough space to make the tar.gz first. I need to upload it "real time"... so I used this command

I log to my ftp server, using simple "ftp" linux command and then

put |"tar cvzf - ./" backup.tar.gz

this should work correctly, but I have a problem... the data I have to transfer is over 1 GB and this "put" command takes a lot of time (client and server are not on the same LAN, I use internet to transfer data) and so, for some reason, the connection drops.

Anyone knows a way to split a tar in multiple pieces and submit them via ftp? I know that tar permits to create multiple archives, but I would have to keep them locally (and I don't have enough space...), so this solution is wrong.
I thought of creating a script that:
- create a piece of tar locally (let's say 100MB)
- send it through ftp (maybe using lftp that allows batch process)
- once send is successful, deletes the "temporary" tar-piece created
- creates another 100MB tar skipping what has already been submitted and the process start again from beginning till end of tars

but...I don't know if there's a way to create a tar-piece "skipping" a number of bytes (at least I don't know that way and I found no info about it...)...

anyone knows how to accomplish that?
Or maybe a better solution...

Bye
 
Old 01-15-2009, 11:47 AM   #2
nflenz
Member
 
Registered: Feb 2006
Distribution: CRUX 2.4
Posts: 96

Rep: Reputation: 18
Try using ssh instead.

Code:
tar zc $dir | ssh $hostname tar zx -C $destination
I did something similar to this once. I didn't test the above command, so sorry if it doesn't work.
 
Old 01-15-2009, 03:06 PM   #3
mbarne
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you, I'll give it a try.

Now I'm trying with a pipe (mkfifo), lftp for batch processing and nohup... let's hope it works.

Bye
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to upload backup file to smb share c_mitulescu Linux - Networking 1 03-15-2007 11:34 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
Cant upload to another FTP brandog Linux - Software 1 05-03-2003 02:47 PM
Can't Upload FTP twantrd Linux - General 1 03-28-2003 09:15 PM
ftp upload hotrodowner Linux - Networking 20 10-11-2002 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:20 AM.

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
Open Source Consulting | Domain Registration