Security Basics mailing list archives

RE: Help writing a back up script


From: "Hayes, Ian" <Ian.Hayes () wynnlasvegas com>
Date: Fri, 21 Oct 2005 15:21:36 -0700

-----Original Message-----
From: Juan B [mailto:juanbabi () yahoo com]
Sent: Thursday, October 20, 2005 2:24 AM
To: security-basics () securityfocus com
Subject: Help writing a back up script

Hi guys,

I need to back up some data to remote ftp server on
weekly basis.

the local machine is xp. how can I write a script that
logs in to the ftp ,deletes a a file in the ftp server
and uploads the data?

Write a text file that has the FTP commands you want to execute:

ftp somehost
USER myuser
PASS mypass
DELETE oldfile
PUT newfile

Save as ftpscript.txt

Invoke the script like so:
ftp -s:ftpscript.txt


--
Ian Hayes | Senior Systems Engineer
Wynn Las Vegas
3131 South Las Vegas Blvd, Las Vegas, NV 89109
Ph (702) 770-3252 | Cell (702) 266-6002
Ian.hayes () wynnlasvegas com



Current thread: