LinuxQuestions.org
Visit Jeremy's Blog.
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 03-19-2010, 02:25 PM   #1
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Rep: Reputation: 15
Problems with ftp syncing (issue with untarring)


I'm trying to make a file sync setup. I was getting really bewildered trying to upload files that weren't in the currect directory, so I broke it up like this.

Code:
cd ~/Desktop
find . -type f -mtime -1 | xargs tar -rf find.tar
Which would make a simple tar of everything recently modified.

Code:
#!/bin/bash

#Prelude
STUFF=$*
CURDIR=`pwd`
BASENAME=$(basename $CURDIR)
echo $BASENAME
cd $HOME/Desktop
HOST='****'
USER='****'
PASSWD='****'

ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
cd me_ftp
mput find.tar
bye
EOT
This works, except I see no way to untar the files on the server.
 
Old 03-19-2010, 02:42 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 248Reputation: 248Reputation: 248
Why not run a script on the server that ftps to your machine and gets the tar then untars it ?
 
Old 03-19-2010, 03:26 PM   #3
Muscovy
LQ Newbie
 
Registered: Nov 2009
Distribution: AlexandOS 10.10
Posts: 25

Original Poster
Rep: Reputation: 15
The server I'm using doesn't have ssh access.
If there's not a way to untar through ftp, can you recommend any syncing tutorials? I was getting weird issues doing files in directories when I made it run file-by-file.
 
Old 03-19-2010, 03:28 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,238

Rep: Reputation: 121Reputation: 121
Quote:
Originally Posted by Muscovy View Post
I'm trying to make a file sync setup.
Is there some reason you aren't using "rsync"?
 
  


Reply

Tags
bash, ftp, sync, upload


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
Good FTP client for website syncing? skullmunky Linux - Software 1 07-10-2006 07:18 PM
syncing issue with Gtkpod jsandro7 Linux - Hardware 0 12-30-2005 12:14 PM
syncing directories over ftp (console) nielchiano Linux - Networking 1 10-10-2004 07:51 AM
gentoo install: untarring Stage 3 problems hamish Linux - Distributions 10 09-27-2004 02:52 PM
Problems syncing with Palm V rcarr Linux - Hardware 2 10-16-2003 09:07 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration