Archive

From DrFTPD

Jump to: navigation, search

Contents

Archive

Introduction

Archive is a plugin that allows you to define the long term storage plan for files in a particular section. It works by configuring an ArchiveType for each section. Each ArchiveType will then run every "cycleTime" seconds checking for valid directories to archive. If a directory is found, and no other directories are currently being archived in that section, the ArchiveType will process that directory. Any sections that are not configured with an ArchiveType will not be subject to the Archive process.


Process

For a file to be archvied, the job will have to pass through three filters:

  1. Archival plugin begins a job according to achive.conf
  2. slaveselection-jobup.conf and slaveselection-jobdown.conf kick in and apply conditions to the job.
  3. slaveselection-up.conf and slaveselection-down.conf also filter the job.


ArchiveType(s)

You can define an ArchiveType by:


sectionname.archiveType=NameOfArchiveType


There are currently only a few ArchiveType's available. The way you can configure an ArchiveType to act within the rest of DrFTPD is itself configurable.

*ConstantMirroring
*MoveReleaseToSpecificSlaves
*StripeFilesOffSpecificSlaves


Each section has its own archiveAfter setting. The archiveAfter setting says when an ArchiveType is allowed to execute on a directory. This allows you to not include directories that aren't of a certain age already.

Manual Archival using 'site archive' command

Besides automatic archiving through archive.conf, you can use SITE ARCHIVE to start ArchiveTypes manually.


archive.usage=SITE ARCHIVE Directory [ArchiveType] [... property settings ...]


The [... property settings ...] field is space delimited and can be used to set any property needed for that section. In archive.conf, properties are defined by section (i.e., sectionname.destSlave=drftpd). With the property list, you can define these on the fly dynamically through the SITE ARCHIVE command.


Example:  SITE ARCHIVE /pub/linux/kernel/2.6.16 ConstantMirroring slavename.1=drftpd archiveAfter=60


You can also view the current ArchiveType's that are executing with "SITE LISTARCHIVETYPES"


Logs of the slave2slave file transfers and the ArchiveType's progress report in logs/mirroring.log


Notes On JobManager

Please note that if you use the 'site removejob' command, any files that were remaining in the queue to be xferred will be DELETED from the source. This will of course not affect files already transferred.

site listjobs
Lists the current jobs in queue.
site removejob <#,range (1-100)>
Removes specified jobs from the queue. (NOTE THAT THESE FILES WILL BE DELETED FROM THE SOURCE)
site stopjobs
Stops the jobqueue. (Currently transferring items will finish)
site startjobs
Starts the jobqueue. (This is done automatically unless you stop it)
Personal tools
SourceForge.net Logo