Skip to content

garysheppardjr/box-archiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Box Archiver

Box Archiver provides a web service that, when called, archives files to Box, provided you login with an account that has access to the destination Box folder.

Installation

  1. Login to the Box Developer Portal to register a new app. You will need the app's client ID and client secret later.
  1. Clone this repo.
  2. Adjust the initialization parameter values in src/main/webapp/WEB-INF/web.xml.
  3. Build using Maven: mvn install.
  4. Deploy the resulting web application to the servlet container of your choice, such as Tomcat.

Usage

If you deploy the web app as https://host.domain.com/box-archiver, load the following URL in your browser to start archiving:

https://host.domain.com/box-archiver/archive?minagedays=30&preserve=false

The preceding URL will first challenge you for Box credentials and then archive files that are at least 30 days old, deleting them from disk when they are successfully uploaded to Box.

Parameters:

  • minagedays: Files at least minagedays old will be archived to Box. Files newer than that will not. The default value far predates the discovery of practical uses of electricity, let alone computers, so minagedays is virtually required, and omitting it will likely have no effect.
  • preserve: If preserve is false, the files will be deleted from disk after successfully being copied to Box. If true, the files will stay on disk and also be copied to Box. preserve is optional, and the default is false.

Contributions

Contributions are welcome, subject to this project's license.