LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problems with ftp syncing (issue with untarring) (https://www.linuxquestions.org/questions/linux-general-1/problems-with-ftp-syncing-issue-with-untarring-796555/)

Muscovy 03-19-2010 02:25 PM

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.

smoker 03-19-2010 02:42 PM

Why not run a script on the server that ftps to your machine and gets the tar then untars it ?

Muscovy 03-19-2010 03:26 PM

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.

Quakeboy02 03-19-2010 03:28 PM

Quote:

Originally Posted by Muscovy (Post 3904842)
I'm trying to make a file sync setup.

Is there some reason you aren't using "rsync"?


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