How to automate backup from Windows Server to ftp server

by Volker Weber

I am trying to create a daily backup of two relatively small but essential directories of a Windows 2003 Server using ftp. How would you solve this on Windows?

Scenario: 2 Servers

  1. Windows 2003 Server with access to the Internet, all incoming ports besides Terminal Service closed
  2. Linux Server on the Internet, all incoming ports besides FTP closed

Task: Create a daily full backup from two directories on server 1 to compressed archives on server 2. Archives should be named by date, like and

How would you automate this?


Nero BackItUp can do FTP backups. :) I don't know about the other task requirements however, never used it myself expect when I had to help others who wanted to do something with the software.

Daniel Haferkorn, 2008-07-14

How or with what? I believe SyncBack would do the job. There's been a tutorial on Lifehacker for the free version.

Oliver Regelmann, 2008-07-14

I was told rsync can do everything... or I'm wrong?

Volker Jürgensen, 2008-07-14

I would use the AT command to schedule a backup that runs something like this:
-- begin batch file --
@echo off &setlocal enableextensions
for /f "tokens=1-3 delims=./-" %%f in ("%date%") do (
set today_=%%h%%g%%f
set dd_=%%f
set mm_=%%g
set yyyy_=%%h)
echo %today_%
echo dd_=%dd_% mm_=%mm_% yyyy_=%yyyy_%

:: Insert youor backup routine here, using %today_%.ext as the filename to back up to

:: Insert your method of transferring files here

for %%v in (today_ dd_ mm_ yyyy_) do set %%v=
endlocal &goto :EOF
-- end batch file --

I'd be tempted to ditch FTP and use SSH for transfer. FTP is notoriously insecure, to say the least...

I'd use SSH as the transfer mechanism, get myself an SSH keyfile onto the Windows box and a copy of PSCP from the PuTTY project (, and upload the files there.

However, if you're dead set on transferring via FTP, you could amend the batch file to use echo statements to build a "transfer.txt" file that does the FTP open/transfer script, and contains the correct filename based on the environment variable %today_%. Just add the line "ftp

Philip Storry, 2008-07-14

Bah! My answer got truncated!

I'll send you an email tonight, just in case. :-)

(Plus I can add corrections, and further information!)

Philip Storry, 2008-07-14

Although not specifically about using FTP, this article suggests an interesting approach to this kind of off-site backup, which may be of interest =>

Paul Harrison, 2008-07-14

create a schedule and use cmd line version of rar
then use ftp.exe with script (usualle dont work very well for x64) if x64 use filezilla

assuming security isnt a requirement

and if they are small use drivehq free for 1gb

Flemming Riis, 2008-07-14

I use SyncBack for similar tasks. I schedule the task to do date specific backups, but run it more than once per day. If a file has been omitted (e.g. network timeout) it would be updated.
Absolutely love it.

Stephan H. Wissel, 2008-07-14

you can use opensource software, 7zip and filezilla or ftp.exe, look here for sample using 7zip and date:

juan sanchez, 2008-07-14

use Philip's to create the file

conent of vowe.txt

open ftp.vowe.somewhere
user vowe
this is not my pass
cd wheretoput
put file1
put file2

ftp -s:vowe.text

if you need errorhandling you can use errorlevel to see the result

Flemming Riis, 2008-07-14

I have been using Cobian Backup for a couple of years and it has always worked perfectly.

Chad Schelfhout, 2008-07-14

Look at rsnapshot

"rsnapshot is a filesystem snapshot utility based on rsync. It makes it easy to make periodic snapshots of local machines, and remote machines over ssh. It uses hard links whenever possible, to greatly reduce the disk space required."

Bill Brown, 2008-07-14

Is it just me or did you forget some kind of encrypton in this scenario?

Do you have shell access on the Linux server?

Timo Zimmermann, 2008-07-14

Get JungleDisk and automate it completely. Cross platform, uses Amazon S3 for storage, which is very reliable and dirt cheap.

Jan Tietze, 2008-07-14

+1 for JungleDisk. I’m using it for my off-site back-up needs, and it’s very nifty.

Ben Poole, 2008-07-14

I second SyncBack - brilliant!

Colin Williams, 2008-07-15

i would'nt do it with FTP (plain passwords, etc.)!! NO Way. But if so you could do it all within Windows Server itself.
- Task-Scheduler #1 packs the package or directory or whatever
- Task-Scheduler #2 does "ftp put" package.
- both Tasks could combiened with "Backup für Faule" Script from ;-)
- both Tasks can prepared in two Batchfiles:
pack.cmd: zip *.* > (short version of the comandline)
ftpcopy.cmd: ftp put
- run Batchfiles as sheduled Tasks on wich time you want.

the good point: you can see within the Eventviewer if the Backup was Ok or not... without paying any Software extra or so ;-)

Henrik Heigl, 2008-07-17

Old archive pages

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.


Paypal vowe