Solved

FTP folder file backukp

Posted on 2003-11-24
11
1,198 Views
Last Modified: 2011-08-18
I have a ftp server.
I update the data there from different locations.
Each user has their directory.

I want to write a script which I can schedule to backup my data.

I am on a windows XP box.
My Server is 2003.

The answer that can provide me with the scirpt will get the points.

-------------------------------------------------------------------
Hyperlinks do not count as answers.
It is not possible does not count as an answer.
-------------------------------------------------------------------

Thanking You
Smit.
0
Comment
Question by:ECIQue
11 Comments
 
LVL 11

Assisted Solution

by:adonis1976
adonis1976 earned 150 total points
ID: 9810400
i would try doing it this way.

have a text file say as copy.txt. type these lines pertaining to your ftp server. "lcd" is the local location on your computer where you want to backup the data.

open xxx.xxx.xxx.xxx
username
password
cd /
binary
hash
lcd c:\
mget *.*
bye


and then have a file backup.bat

type the following line in it

ftp -i -s:copy.txt

schedule the batch file at a particular by using your windows scheduler. You can find this in your control panel of windows XP.
 Let me know if that helps
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 9811177
btw, xxx.xx.xx.xx stands for the IP address of the remote server
0
 
LVL 16

Accepted Solution

by:
_nn_ earned 350 total points
ID: 9811507
Alternatively, get a better FTP client here : http://www.ncftpd.com/download/
(direct link to the Win32 binaries ftp://ftp.ncftp.com/ncftp/binaries/ncftp-3.1.6-win32.exe)

Then, your script will be a simple one-liner, see http://www.ncftpd.com/ncftp/doc/ncftpget.html (specifically, the -R command-line option)
0
 

Author Comment

by:ECIQue
ID: 9811720
adonis1976
  Your script gets files only from that folder
  It does not do a recursive ftp.

_nn_
  Your program works.
  I like it,
  but then, I try avoiding third party softares.
  So, if adonis cant come up with a script by tommorrow,
  You will have the points.
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 9811760
ok.. try this..

replace the line

mget *.*

with

get -r *.*
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 11

Expert Comment

by:adonis1976
ID: 9811762
that is get space -r *.*
0
 

Author Comment

by:ECIQue
ID: 9812624
ftp> get -r *.*
Error opening local file *.*.
> *.*:Invalid argument
ftp> bye
221

0
 

Author Comment

by:ECIQue
ID: 9812627
i did type in
ftp> get [space] -r *.*

thanks.
0
 
LVL 11

Expert Comment

by:adonis1976
ID: 9812979
i just looked at the MAN pages for ftp and it is not possible since the subdirectories are dependent on the file structure of the OS. So cany copy sub directories using ftp. so you can award -nn- if you wish.
0
 

Author Comment

by:ECIQue
ID: 9813860
You get Partial credits atleast for an honest answer.

Thank you experts

Always
Smit.
0
 
LVL 1

Expert Comment

by:scotMcalpine
ID: 9819803
spend some money on software. (if its worth doing right)
I recommend handy-backup.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now