Solved

FTP folder file backukp

Posted on 2003-11-24
11
1,200 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Robocopy - migrate user shares access denied 6 1,516
How to Test Com Ports on NT 4.0 Workstation 2 276
Dell PowerEdge raid drive replacement 13 500
Locking down a taskpad 1 163
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…
The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

823 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