Skip to main content

Decipher Support

All the topics, resources needed for Decipher.

FocusVision Knowledge Base

Duplicating Surveys Using copy-survey

  Requires Decipher Cloud

Overview

 

The copy-survey command allows you to duplicate and/or backup an entire project. It is better than using the default Unix cp -r command, as it does not slow server performance when run.

Note: The data/state.db file is not copied in this process as it is not necessary to do so. This file is usually very, very large and sometimes even gigabytes in size.

There are several modifiers available to refine the information that is copied.

Tip: It is good practice to use "today" when using copy-survey. When using "today" as an argument, the backup directory will use today's date in MMDDYY format (e.g., copy-survey temp-today creates temp-022414 ).

Command Description
copy-survey temp-today Copies the entire project (including the survey, styles, static folder, and all data files)
copy-survey -d today Copies the data only into unique directory (e.g., data.today)
copy-survey -m today Copies the data only and clears the existing data
copy-survey -s temp-today Copies the survey only and no data
copy-survey -u temp-today Copies the entire project and retains the user permissions

Copy the Entire Project

To copy the survey, styles files, data/ and static/ directories, go to the project's directory and run the following command:

copy-survey temp-today

You will be prompted if the temporary directory already exists. The name attribute of the survey tag will be changed to "Copy (subdir) of ...", where "..." is your project's original name.

Copy the Project's Data Only

To copy only the project's data into it's own data/ folder, go to the project's directory and run the following command:

copy-survey -d today

If the copied data directory already exists, a number value will be appended to the end of the new directory (e.g., data.temp.01 ).

You can use the -m modifier to copy the data and remove the existing data with the following command:

copy-survey -m today

This will create a data.MMDDYY directory and clear the original project's data. In other words, move the data.

Copy the Project's Survey Only

To copy only the project's survey and static/ directory, go to the project's directory and use the following command:

copy-survey -s temp-today

This will copy the survey-related information and not the data.

Copy the Entire Project with User Permissions

To retain the user permissions set on a particular project, navigate to the project's directory and run the following command:

copy-survey -u temp-today

This will copy the entire project and retain the permissions set for each user via the Research Hub.