View Single Post
Old 11-29-2012, 06:05 PM  
xy0thep
Junior Member
 
Join Date: Nov 2012
Posts: 8
Exclamation your ArchiveScript: some questions

hi there,

first of all i need to say that im only using your archive script (latest version). concerning that i got some questions:

1.) i set up the xml-file like the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<tasks xmlns="http://jeza.ioFTPD.Tools/XMLSchema.xsd">
  <task>
    <logFormat>ARCHIVE: &quot;Archive&quot; &quot;Moving {0} from {1} to {2}&quot;</logFormat>
    <status>Enabled</status>
    <actionType>Move</actionType>
    <source>C:\\FTPD\\TEST</source>
    <sourceVirtual>/TEST/</sourceVirtual>
    <destination>X:\\INCOMING</destination>
    <destinationVirtual>/ARCHIVES/INCOMING/</destinationVirtual>
    <action id="TotalFreeSpace">
      <value>4000000000</value>
      <minFolderAction>1</minFolderAction>
    </action>
  </task>
</tasks>
question is: when selected move as "action type" isnt the source supposed to be deleted (automatically, after successful move)?
it worked so far. when hdd-space dropped below ~4GB the oldest stuff was moved to defined destination dir, but the source dir kept the stuff aswell and didnt delete it.

2. what is that "logFormat" about? is it for internal logging (see my third question aswell)?
i'd like to have an output to my ioftpd.log file for being able to use that output on dzsbot to annouce moved dirs on irc. is that possible?

3. from config file:
Code:
    <add key="FileNameInternalLog" value="c:\\ioFTPD\\logs\\jeza.ioFTPD.log" />
whats that about? i couldnt find a file named like that on the logs dir. is it supposed to be the location of the "normal" ioftpd.log? (see question 2)

4. concerning updates of a dupe database:
any chance to support nxtools' db? i tried the following setting, but i got an error:

Code:
   <add key="UpdateDupe" value="true"/>
    <add key="DataSourceDupe" value="Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db"/>
    <add key="DataSourceDupeUpdateCommand" value="UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}'"/>
error:

Code:
[23:14:54] [R] 200-[2012-11-29 23:14:52] Updating DUPEDB with 'UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}''
[23:14:54] [R] 200-[2012-11-29 23:14:52] DUPEDB : 'Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db'
[23:14:54] [R] 200-[2012-11-29 23:14:52] releaseName='RELEASE', realPath='C:\FTPD\TEST\RELEASE', virtualPath='/ARCHIVES/INCOMING//RELEASE'
[23:14:54] [R] 200-[2012-11-29 23:14:52] ExecuteNonQuery: 'UPDATE Folders SET PathReal = 'C:\FTPD\TEST\RELEASE', PathVirtual = '/ARCHIVES/INCOMING//RELEASE' WHERE ReleaseName = 'RELEASE'
[23:14:54] [R] 200-[2012-11-29 23:14:54] System.Data.SQLite.SQLiteException (0x80004005): SQLite error
[23:14:54] [R] 200-no such table: Folders
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.BuildNextCommand()
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteDataReader.NextResult()
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
[23:14:54] [R] 200-   bei System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.DataBase.ExecuteNonQuery(String commandText)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.UpdateDupeDb(ArchiveTask archiveTask, DirectoryInfo directoryInfo)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTask(ArchiveTask archiveTask, DirectoryInfo directoryInfo)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTask(ArchiveTask archiveTask, List`1 sourceFolders)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ManageDiskSpace(ArchiveTask task, List`1 sourceFolders)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.ExecuteArchiveTasks()
[23:14:54] [R] 200-   bei jeza.ioFTPD.Framework.ConsoleAppTasks.Execute(TaskType taskType)
[23:14:54] [R] 200-   bei jeza.ioFTPD.Archive.Program.Main()
[23:14:54] [R] 200 Command successful.
guess the error is that nxtools' db has other sql tables?? maybe someone knows what to adjust to make it fit to nxtools db?

guess it has to be set here, but i dunno what.

Code:
   <add key="UpdateDupe" value="true"/>
    <add key="DataSourceDupe" value="Data Source=c:\\ioFTPD\\scripts\\nxTools\\data\\DupeDirs.db"/>
    <add key="DataSourceDupeUpdateCommand" value="UPDATE Folders SET PathReal = '{1}', PathVirtual = '{2}' WHERE ReleaseName = '{0}'"/>
thx for replies in advance!
xy0thep is offline   Reply With Quote