Recursive FTP -- here at last.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Recursive FTP -- here at last.
# 43  
Old 03-28-2007
windows to unix folder replication

Perdebro

How do i do it the other way round

eg. Let say, i have a main folder called abc on windows and similar folder on unix.

If i creat any subfolders to abc on windows, how do i replicate the same onto unix.


any help would be greatly appreciated
# 44  
Old 06-18-2008
Directory Recursing

I ran across this script and am hoping what I'm encountering can be easily overcome because this will be invaluable in a server migration I'm working on. I'm able to connect to my ftp server and it logs in. I'm using

Code:
ksh HardFeed -drfv <server> <user> httpdocs

to initiate the script. I get reasonable output for everything in my main directory, then it begins on the sub directories. My first subdirectory is BeTheBoss and it has a subdirectory of images, and HardFeed seems to get through those fine. The 2nd subdirectory is where I run into trouble. I get the following output:

Code:
rm: cannot remove `/tmp/HardFeed.tp.5660.3': No such file or directory
rm: cannot remove `/tmp/HardFeed.ok.5660.3': No such file or directory
httpdocs/BeTheBoss/Binder is a remote directory that already exists
FATAL ERROR: timed out waiting for:
             BeTheBoss-AK66.html

and the script aborts. My directory tree looks something like this:

Code:
/httpdocs/BeTheBoss/images
/httpdocs/Binder

From the looks of it it's using Binder as a subdirectory of BeTheBoss, but I'm not quite sure why. I'm going to try to dig through the script and solve it myself, but I don't know if I have quite enough shell scripting background to manage it.f

Thanks in advance if you beat me to the answer; if I find the fix I'll post back to this forum. Smilie

--Dan
# 45  
Old 06-18-2008
My only guess is that your version of ksh is not handling recursion correctly and is getting lost. I would check to see if any patches to ksh are available.
# 46  
Old 06-19-2008
Data

I checked for updates to ksh and I have the lastest versions installed. I'm using SuSE 10.3. Not sure why I'm having trouble, but it's definitely unfortunate. I was really hoping this would save me time in my attempts to migrate my server. Smilie

--Dan
# 47  
Old 06-19-2008
I read a couple other posts and someone suggested ncftp as a possible alternative. It actually did what I needed. Too bad, HardFeed looked promising, but I'm not sure what was causing the recursion trouble. Smilie

--Dan
# 48  
Old 08-21-2008
Has anyone had success in using HardFeed with Novell. I am currently trying to find ways to backup certain directories on my Novell server. I am wanting to do a one time full back up and then back up just what was changed. I like the -f switch in HardFeed using the timestamp. I have got it up and going but I get the following errors (full command in red) when I try to do a "ksh HardFeed -rdfs novell user /VOL1/test".


mgmcelwee@ROM1BU2:/shared$ ksh HardFeed -rdfs novell mgmcelwee /VOL1/test
password -
WARNING: badly formatted line in directory listing for:
- [RWCEAFMS] mgmcelwee 4 Aug 21 10:57 ./New Text Document.txt
attempting outside-to-inside scan

ERROR: outside-to-inside scan has also failed
giving up on:
- [RWCEAFMS] mgmcelwee 4 Aug 21 10:57 ./New Text Document.txt

WARNING: badly formatted line in directory listing for:
d [RWCEAFMS] mgmcelwee 512 Aug 21 11:22 ./New Folder
attempting outside-to-inside scan

ERROR: outside-to-inside scan has also failed
giving up on:
d [RWCEAFMS] mgmcelwee 512 Aug 21 11:22 ./New Folder

WARNING: badly formatted line in directory listing for:
d [RWCEAFMS] mgmcelwee 512 Aug 21 11:22 ./New Folder (2)
attempting outside-to-inside scan

ERROR: outside-to-inside scan has also failed
giving up on:
d [RWCEAFMS] mgmcelwee 512 Aug 21 11:22 ./New Folder (2)

mgmcelwee@ROM1BU2:/shared$


It appears to me that the directory structure of Novell is not reckonized by HardFeed. Does anyone know how to get this working?

Thanks in advance!
# 49  
Old 09-08-2008
check ncftp - Linux.com :: Upload directories recursively with NcFTP
after logging in, get -R somedir will get you the whole dir recursively.

another advantage is that you could also upload a whole dir.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Search recursive

before posting, I have tried to find my answer elsewhere. no luck. I need to find a file buried in a folder somewhere. Master folder has 10 sub folders. each sub folder has folders too. I found this but it does nothing I am on Mac and use Applescript. do shell script "find... (2 Replies)
Discussion started by: sbrady
2 Replies

2. UNIX for Dummies Questions & Answers

recursive search and ftp

Could someone help me in recursive search and ftp'ing the files to remote server? The host machine will have /dir1/dira/list_of_files1 /dir1/dirb/list_of_files2 /dir1/dirc/list_of_files3 . . . so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies

3. UNIX for Dummies Questions & Answers

Recursive Permissions???

Is there anyway that I can change permissions on a directory and all its sub-directories and files using one single "chmod" command?? (5 Replies)
Discussion started by: the_red_dove
5 Replies

4. UNIX for Dummies Questions & Answers

recursive wc on a directory?

Hi all, I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice? thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies

5. Cybersecurity

Recursive SFTP

Hello, I need to transfer files from Serve1 to Server2. Previously I was using scp command. Now I have to use sftp (due to audit issues). The problem with sftp is (atleast to my level of knowledge) we cannot transfer dirs (and files within that dir). Is there a way to solve this? Looks like... (1 Reply)
Discussion started by: MohanTJ
1 Replies

6. UNIX for Advanced & Expert Users

recursive sorting

In the ls command, -t option and -R option dont work simultaneously. ls -t ---> lists the files with sorting based on file date ls -R ---> lists the files recursively. How to make utilize both in the same command.? I want to sort the recursive files listing.. (1 Reply)
Discussion started by: fermisoft
1 Replies

7. Shell Programming and Scripting

recursive rcp

I wrote a shell script (AIX) to extract the file "/rep1/toto" from all the hosts referred in a list and send them to one local directory named ~/$host-$file with the hostname as prefix rcp -p user@host:/rep1/$file ~/$host-$file where file = toto ==> it works ! I would do the same thing... (6 Replies)
Discussion started by: Nicol
6 Replies

8. Shell Programming and Scripting

perl + Net::FTP::Recursive

Problem: It will not advance to the next user in the list. It always dies right after it sends the 2/2 files from the first users dir. $USERLIST="/export/home/mxdooley/perl_ftp/userlist"; $USER_DIR="/export/home/mxdooley/perl_ftp/homes";... (2 Replies)
Discussion started by: Optimus_P
2 Replies

9. UNIX for Dummies Questions & Answers

recursive effect!!

I run the following command in some of my folders... and ended up with a huge mess!! find . -type f -exec perl -e 's/blabla/zzzxxxx/gi' -p -i.bak {} \; I had to kill the process and later when I checked with one of my folders.. ls vaditerm.dt.bak vaditerm.dt.bak.bak... (2 Replies)
Discussion started by: sskb
2 Replies

10. UNIX for Dummies Questions & Answers

Recursive FTP

I am trying to write a recursive FTP script and have come to a point where I need to test if the file is either a normal ascii file or a directory. My question is how do I test if the file is either ascii or directory. (1 Reply)
Discussion started by: aslamg
1 Replies
Login or Register to Ask a Question