Solved

FTP folder file backukp

Posted on 2003-11-24
11
1,201 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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
 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

827 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