Pular para o conteúdo principal
Base de Conhecimento da FocusVision

Copy Survey

  Requires Decipher Cloud

1:  Overview

The copy-survey command allows you to duplicate and/or backup an entire project. It is better than using the default Unix copy command (e.g. cp -r ) as it does not bring the server to its knees when ran.

The data/state.db file is not copied in this process as it is probably 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.

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 (survey, styles, static/ 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

2:  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 copi the survey tag will be changed to "Copy (subdir) of ..." where "..." is your project's original name.

3:  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, we are moving the data.

4:  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.

5:  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.