Requires Decipher Cloud
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 ).
||Copies the entire project (survey, styles, static/ and all data files)|
||Copies the data only into unique directory (e.g. data.today)|
||Copies the data only and clears the existing data|
||Copies the survey only and no data|
||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:
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.