Skip to main content

Decipher Support

All the topics, resources needed for Decipher.


FocusVision Knowledge Base

Scripts for Managing Archived Projects

  Requires Decipher Cloud




While survey data is automatically archived within the Decipher system after a prolonged period of inactivity, you have a variety of options for managing this process, including survey/data recovery and archival prevention.

Running a Script to Archive a Project    

You can run a script to force a project to archive as follows:

archive survey/path


   archive [-cn] <survey name>
    -n  dry run
    -q  quiet
    -m  allow archival of sub-directories
    -f  force archival, even if the project is too young to be archived

Note: A certain amount of time must pass before you can attempt to archive a project. The script will output the required time upon running.

Note: If a project is manually archived through the shell, any existing files at the time of archival will not be removed.

Commands to Manage Archived Projects

Several commands are available to help you manage archived projects.

Listing Archived Surveys

You can list archived surveys in a directory.

To do this, navigate to the directory where there are archived surveys and run the following command:


A list of surveys that have been archived at this location are returned. For example,

Surveys archived here:
selfserve/9d3/0119420/data.clear     Nov 13 2011 09:01AM
selfserve/9d3/0119420/data.clear     May 15 2011 09:11AM
selfserve/9d3/080600                      Dec 02 0211 03:07AM
selfserve/9d3/080601                      Dec 02 0211 03:00AM
selfserve/9d3/080602                      Dec 02 0211 03:03AM

Recovering Archived Surveys

You can recover a survey that has been archived.

To do this, enter the following command:

unarchive survey/path

For example,

unarchive selfserve/9d3/080602

Commands to Manage Archived Survey Data

Several commands are available to help you manage archived survey data.

Listing Archived Survey Data

You can list the data in a survey that has been archived.

To do this, first navigate to the desired project directory, and enter the following command:


This command returns a list of data directories in the archived survey. 

For example:

Surveys archived here:
selfserve/1a1//150117/data.clear        Feb 09 2015 03:18AM
selfserve/a1a/1150117/      Feb 09 2015 03:18AM
selfserve/a1a/1150117/data.merge.032415       Mar 27 2015 04:10AM
Mar 27 2015 04:10AM
selfserve/a1a/150117/temp-view           Mar 15 2015 08:23AM                       

Recovering Archived Survey Data

You can recover a data folder in an archived survey.

To do this, enter the following command:

unarchive data_directory

For example:

unarchive selfserve/a1a/150117/

The data folder is now restored to the project's location.

Preventing Data From Archiving

Several commands are available to prevent data from being archived.

Note: Consider that storage space may be limited.  Executing these commands may incur storage cost if disk space is limited.

Preventing Surveys From Archiving

You can prevent surveys from being automatically archived after 9 months.

To do this, run the following command in your project directory:

touch keep

This creates a blank file named, keep, in your project which prevents the auto-archival system from running on this project.

Preventing Mail Folders From Archiving

You can prevent email from being automatically archived after three months.

To do this, run the following command in your project's mail directory:

retain . mail

Preventing Partial Data From Archiving

You can keep partial data from being automatically archived after three months. 

To do this, run the following command in your project's data directory:

touch keep-state

Archival FAQ's

Q:  What gets archived?

A:  The entire project directory, including the survey, survey data, static files, etc.

Note: A survey cannot be archived if it was accessed or modified recently: changes to survey.xml, survey data, or anything that would leave an entry in the audit log file will prevent archival by default. We also analyze web server rlog files just in case you are somehow accessing a Javascript or image file within the static directory from another survey. When archiving manually, the archive -f option will override this.

Q:  Where does the data go?

A:  The content of the directory is compressed into a single file. This can compress data to as much as 1/10th of its original size. On cloud servers, the files will then appear in the data/archive/ subdirectories. Once successfully compressed, the original directory is erased. Thus, 10 GB of archived data may take up only 1 GB of space afterward, for a 90% data storage saving.

On Rackspace- and Google-hosted servers, the archived data space can potentially be moved to a slower and cheaper disk system.

Note: If server encryption is enabled, the compressed file will be encrypted.

Q:  How do I know what has been archived?

A:  In the relevant survey directory, run archived to view names and archival dates. In the web interface, visit [server]/admin/archived -- note that the page will be enormously large for many larger servers.

You can also review the log file on the server, v2/logs/archive.log though that's mostly there for troubleshooting.