Automate a FTP Transfer using Task Scheduler from a offsite location to a backup location

Hi all,

I need to be able use task scheduler to do backup from a offsite location to one of our internal servers using FTP.

Any help would be greatly apreciated.

regards

Matt
YellowbusTeamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Paul MacDonaldDirector, Information SystemsCommented:
If you're talking about a Windows environment, it should be pretty easy to set up a batch file that can perform the FTP.  Check out  the "- s" switch for the Windows FTP command.  Let us know if you need more help.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
We use this software program to do just that

http://www.handybackup.com/
0
PilouteCommented:
Hi,

Since you don't talk about the system, I will assume you use some Windows OS....

Here's how to use the Windows Task Scheduler :
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sag_tsconcepts03.mspx

Here's how to create a simple batch script :
http://support.microsoft.com/kb/96269

In order to put the twxo together, just schedule a task with :
"cmd /c Batchfilename.bat"

Cheers,
P
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

YellowbusTeamAuthor Commented:
Hi all,

You assume correct it is a windows server 2003 we will be running the ftp from.

Ta
0
YellowbusTeamAuthor Commented:
Can the handybackup download files to a local server from remote server?

Ta
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
No, you install it on the server, you need to complete the ftp transaction. So in your case, you install on nthe remote server, and it will ftp the files to your servers.
0
YellowbusTeamAuthor Commented:
We only have access via FTP to the remote server as its a shared webserver, is there another program that does this job?

i would not know how to create a script that would open the ftp tunnel and copy the data from acertain folder.

Cheers
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
so you need to copy from the remote server via ftp to a local server?
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
if you want to do scheduled ftp transfers to and from, we also use Ableftp.

http://www.hiteksoftware.com/ablef/ftp-client.htm
0
Paul MacDonaldDirector, Information SystemsCommented:
This should get you started if you want to do something yourself:

Create two text files.  Call one FTPtask.bat and the other FTPcommands.txt.

Edit FTPtask.bat so it reads something like:
   ftp -s:FTPcommands.txt NameOfYourFTPServer

Edit FTPcommands.txt so it reads something like:
     lcd WhereeverYouWantToCopyFilesTo
     echo y | mget *.*
     bye

Create a scheduled task to run FTPtask.bat whenever you want it to.  Note you may need to edit the .bat file to change directory or specify a path to the FTPCommands.txt file.
0
YellowbusTeamAuthor Commented:
Well we only need to do ftp from the remote server.

cheers
0
AlexPaceCommented:
Robo-FTP was designed specifically for automating recurring file transfers.  You can launch it using the Windows Task Scheduler or you can use its built-in scheduling features. Here is a sample Robo-FTP script that downloads any files that changed every night at midnight:
:start_download
CRON "@daily"
WORKINGDIR "c:\download\destination\folder"
FTPLOGON "ftp.domain.com" /user="MyUserID" /pw="Secret"
;;FTPCD "/alternate/subfolder" ;; uncomment if not starting from root
RCVFILE "*" /subdirs /emptydirs /serverdate /ifnewer
FTPLOGOFF
GOTO start_download

Open in new window

This is an infinate loop designed to be installed as a Windows Service that starts automatically whenever the computer is rebooted.  If you want to run it as a Scheduled Task instead of as a service just remove the CRON and GOTO lines and specify the script name on the command line using the -s switch like this:
robo-ftp.exe -v -s'c:\folder\subfolder\script.s'
0
YellowbusTeamAuthor Commented:
thanks for the advice am gonna see if i can figure out ho to do it using FTP and batch file

cheers
0
YellowbusTeamAuthor Commented:
Hi some more help with regards to creating a script would be great as i can find out what each switch does but as to what order to put them in to make it work.

i have created the 2 txt files and renamed etc but lets say for instance i want to copy the files from
98.25.62.15:21 to a local drive c:\savehere\backup witha username of joeblogs and a pasword of 12345.

So any help you can give would be awesome

Cheers
0
PilouteCommented:

ftp joeblogs/12345@98.25.62.15:21
cd <to the right directory>
get <whatever you want to get>
bye


have a look at the ftp commands for windows here : http://www.nsftools.com/tips/MSFTP.htm

Cheers
P
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PilouteCommented:
get might be a mget (for a multiple get)...

and here's a more recent version of the doc (for win xp) : http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftp.mspx
0
Paul MacDonaldDirector, Information SystemsCommented:
Let's presume the batch file and ftp commands file are both on drive C: - the same drive C: where you want to store the FTP'ed files.  The FTPcommands.txt file would read something like:

lcd c:\savehere\backup
open 98.25.62.15:21
user
joeblogs
12345
mget *.* (or whatever)
quit

If you're including the ftp server name in the batch file, just remove the 'open 98.25.62.15:21' line from the commands file.
0
YellowbusTeamAuthor Commented:
Thats great thanks for the help :)
0
PilouteCommented:
welcome
0
YellowbusTeamAuthor Commented:
one last thing can someone look at this and tell me where i am going wrong
'lcd C:\Users\l*****.*OM1\Desktop\New folder
open 1**.**.**.30
test1
Password
mget New Folder

bye'

I am using the batch file
/ftp -s:FTPcommands.txt
pause'

And it cant find the folder i want to grab can some tell me where i am going wrong please?

Cheers
0
Paul MacDonaldDirector, Information SystemsCommented:
Try
     mget "New Folder"

or
     mget New*
...if there's nothing else that starts with "New" in the source directory.

You'll also likely need to change the first line to:
     lcd "C:\Users\l*****.*OM1\Desktop\New folder"
0
YellowbusTeamAuthor Commented:
Hi am getting amessage sayin'200 Type set to A'
then mget newfolder? bye

What does this mean?

cheers
0
Paul MacDonaldDirector, Information SystemsCommented:
Try this as the new command file:

lcd "C:\Users\l*****.*OM1\Desktop\New folder"
open 1**.**.**.30
test1
Password
bin
mget "New Folder"
y
bye

0
YellowbusTeamAuthor Commented:
It works but it doesnt copy the folder but only a bitmap image that i put in it and none of the other 2 which are a rtf and text doc these are just a test btw before i do it for real :)

Cheers
0
Paul MacDonaldDirector, Information SystemsCommented:
Is "New Folder" a sub-folder in the FTP site, or is it the name of the folder where the FTP root is?

What if you change the script like this:
lcd "C:\Users\l*****.*OM1\Desktop\New folder"
open 1**.**.**.30
test1
Password
bin
mget *.*
y
bye

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Storage Software

From novice to tech pro — start learning today.