This project is read-only.

Command-line Syntax

> ZipUp.exe <ftpSettings.xml> <jobs.xml>

Configuration

FTP Settings

The FTP settings are passed on to ZipUp via XML-file.

<?xml version="1.0" encoding="utf-8"?>
<FtpSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<User Name="BackupUser" Password="BackupUserPassword" />
<Host Name="backupserver.tld" />
</FtpSettings>

As you can see, the connection settings are still extremely basic. I didn't require any more fancy settings to get the job done for which I started this micro-tool. However, it shouldn't be very complicated to extend the connection settings with more exhaustive capabilities. I'm even pretty sure that the tool can be extended to handle additional other destination-locations/servers other than FTP, if there exist "connector" libraries for them in the .NET community.

Jobs

The second argument XML-file passed on to ZipUp describes which contents are to be uploaded. This file can contain several Jobs. A Job describes a single ZIP-archive on the destination FTP location. Each Job can be composed of multiple Sources. For every Source a FileMask filter can be specified, as well as whether or not sub-directories should be included or if empty folders should also be included in the archive.

<?xml version="1.0" encoding="utf-8"?>
<Jobs xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Job Destination="BackupFileA.zip">
<Sources>
  <Source RootPath="C:/SourceDirectoryA/" FileMask="*.rar" IncludeSubdirs="false" IncludeEmptyFolders="true" />
 </Sources>
</Job>
<Job Destination="BackupFileB.zip">
<Sources>
  <Source RootPath="C:/SourceDirectoryB1/" FileMask="*" IncludeSubdirs="true" IncludeEmptyFolders="true" />
  <Source RootPath="C:/SourceDirectoryB2/" FileMask="*.bak" IncludeSubdirs="false" IncludeEmptyFolders="false" />
  <Source RootPath="C:/SourceDirectoryB3/" FileMask="*" IncludeSubdirs="false" IncludeEmptyFolders="true" />
</Sources>
</Job>
</Jobs>

 Attention: If a Job fails for any reason, all succeeding Jobs and Sources will be ignored/fail as well. The Job/Source loop is not implemented in a robust manner at all so far.

Remark: From what I could observe during debugging, I suggest providing the RootPath to a Source with a trailing (back)slash... although I'm not sure what exactly might be the implications if it is omitted.

Last edited Sep 24, 2015 at 2:42 PM by vamPierchen, version 9