What is winbackftp? winbackftp is designed to backup files from a Microsoft Windows computer to a FTP server. The main program is a perl script, winbackftp.pl. A simple archive program is also included which can be run on the FTP server to provide a historical archive of the backups produced by winbackftp.pl. See README.wbf-archive.txt for more information about the archive program. Requirements A perl interpreter. winbackftp was developed for ActivePerl for Windows from ActiveState so it is the recommended interpreter but any perl interpreter for Windows should work so long as you have the Net::FTP, Net::Ping and File::Find perl modules (all of which are normally included with a standard perl distribution). ActivePerl can be obtained from ActiveState's website at http://www.activestate.com/ An account on a FTP server where the files will be backed up to. A Windows computer to run winbackftp on that has files you want backed up. Installation Copy all the files included with the winbackftp distibution to a location on your computer such as C:\winbackftp Change the options at the top of the winbackftp.pl script to suit your situation. More information about the available options is in the Configuration section below. You now need to decide how you want to run winbackftp.pl. A batch file, winbackftp.bat is included with the winbackftp distribution. If you do not associate .pl files with your perl interpreter on your computer you should use winbackftp.bat to start winbackftp. You may need to change path information in winbackftp.bat if you do not have your perl interpreter at C:\Perl\bin\perl.exe or you did not install winbackftp in C:\winbackftp If you want to run winbackftp manually you should create a desktop or start menu shortcut to winbackftp.bat or winbackftp.pl. You would then double click on the shortcut you created to run winbackftp when you want. If you want to run winbackftp automatically, you can either create a shortcut in your startup folder in your start menu or you can create a Windows scheduler task. The startup folder shortcut is the easiest way to automatically run winbackftp. Simply create a shortcut to winbackftp.bat or winbackftp.pl and move it to the startup folder in your start menu. Creating a Windows scheduler task to automatically run winbackftp is beyond the scope of this document. Configuration There are several configuration variables at the top of winbackftp.pl. The first is $ftpserver. This should be set to the IP address or hostname of your FTP server. Using an IP address is recommended to avoid possible DNS problems. The second is $passivemode. This should be set to 1 if you need to use passive FTP mode to communicate with the FTP server through a router or firewall that doesn't support active FTP mode. If you are unsure if you need to use passive mode, change this to 1. The third is $ftpuser. This should be set to your username on the FTP server. The fourth is $ftppass. This should be set to the password for your username on the FTP server. The fifth and sixth are $ftpfperms and $ftpdperms. These set the file and directory permissions mode when storing files and creating directories on the FTP server. They are in regular UNIX permissions mode format. If you do not understand these, the defaults should work fine. The seventh is $fcfile. If you want to use the FTP server archive program, this should be set to the location of the backup-files-changed file on your computer. The backup-files-changed file is included with the winbackftp distribution. For more information about the server archive program, see README.wbf-archive.txt. The eighth is $pretry. This is the number of seconds between attempts to communicate using a basic ICMP ping with the FTP server. ICMP pings are sent by winbackftp to the FTP server to check basic communication with the FTP server. If you are unable to ICMP ping the FTP server check with your FTP server or local network administrator as they are required for winbackftp to work. The default setting should work well. The ninth is $ptrys. This is the number of times to attempt to communicate with the FTP server using ICMP pings before giving up. The default setting should work well. The tenth is $waithours. This is the number of hours to wait between backing up files again. It is intended to reduce the network load caused by backups when the same data is changed often or a large number of files are being backed up. Change this to 0 to disable this feature (backup will run every time the program is run). The default setting should work well. The eleventh is $whfile. If you want to use the waithours function, this should be set to the location of the wait-hours file on your computer. The wait-hours file is included with the winbackftp distribution. The twelfth is $ftpsubdir. If you want all backups to be placed under a different directory on the FTP server than the default, change this to the directory where they should be placed. The thirteenth is @backupdirs. A @backupdirs line should be created for each directory you want to backup. @backupdirs is used to specify which directories and which files within those directories should be backed up to the FTP server. An example would be: push @backupdirs, 'C:\Pictures|.jpg:.gif:.png:.bmp'; which will backup all files in C:\Pictures and any subdirectories under it that have an extension of .jpg, .gif, .png or .bmp to the base server directory 'Pictures' on the FTP server. See the comments in winbackftp.pl for more information. Comments and notes winbackftp is a small program designed to backup files from a Windows PC to an FTP server. It was designed for my particular situation but it is being released to the public in the hope that it may be useful to someone else. It was written mostly in vi on a Linux desktop, with a target platform of a Windows XP PC backing up files to a Solaris 9 SPARC FTP server. That being said, winbackftp.pl should work on any Windows NT, Windows 2000, Windows XP, Windows Vista, Windows 7, etc. PC (anything based on NT) that has a perl interpreter. I would guess that it will probably also work on Windows ME, Windows 98 and Windows 95 if there was a perl interpreter installed. Who knows, maybe even Windows 3.x and/or DOS?! winbackftp should work with any FTP server but I'm more comfortable saying it will work with UNIX FTP servers than I am with Windows FTP servers. The FTP server must allow overwriting of files. Files stored on the FTP server may not be protected (at least not with UNIX permissions protection) if the FTP server doesn't support the SITE CHMOD commmand. Server archiving is not required to use winbackftp. If you do not use the included server archive program (wbf-archive.sh) or do not create your own similar archival program for the backups that winbackftp generates on the FTP server, you will only have the lastest copy of the data that was backed up when winbackftp last ran. Without some type of historical archive, you will not be able to go back to a previous copy of the data. This can be a problem if the data is corrupted on your computer and it goes unnoticed and the corrupted data is backed up to the FTP server. In that situation without some type of historical archive on the FTP server, you would be left with only the latest copy of the data which is corrupted. See README.wbf-archive.txt. You should monitor the disk usage of the backups that winbackftp and the server archive system uses on the FTP server. You do not want to fill the disk or exceed your quota on the FTP server. If that happens you may lose data. Depending on what you are backing up, the winbackftp backups and/or archives on the server may be very large. Test this program well before relying on it at any level. There are absolutely no guarantees or anything with this program. If you find a bug, see AUTHORS.txt for contact details. Do not backup your whole computer with this program. It is not designed for that, only limited backup of certain files/directories. winbackftp website The winbackftp website is http://www.johnmerriam.net/winbackftp where you can find the latest version and any important information about winbackftp.