Export Files
FileCloud uses its own format to store files to solve any issues with file collision and name spaces in large deployments. This storage format is not humanly readable, but you can export the stored data to its original format using our Export tool.
The FileCloud Export tool lets you export files of a particular user or all users, or files from a specific folder, or a specific file.
Export Files and Folders
- In the command line enter:
For Windows:cd c:\xampp\htdocs\resources\tools\fileutils PATH=%PATH%;C:\xampp\php
For Linux:cd /var/www/html/resources/tools/fileutils
Then, for both Windows and Linux, enter:
php exportfs.php -d <to path> -u <user> -p <from path> -h <hostname> -c csvFileName.csv -r realRun
Parameters:
[required] -d = Export target directory.
[required] -u= User account whose files are to be exported or 'all' to export all files.
[required] -p = File or folder that needs to be exported.
[optional] -h = Fully qualified name of the site to be exported in multisite installation. Omit the option for standalone or default site.
[optional] -c = File name for generated CSV list of exported files. The '.csv' extension must be appended to the end of the file name. CSV files will be generated in the same directory as the exported files.
[optional] -r realRun = Use string 'realRun' to perform actual export. Not specifying this does only simulation of files/folders export.
Exporting files for a single user
The following code shows how to export files for user 'jdoe' to directory 'cloudexport'.
php exportfs.php -d /cloudexport/ -u jdoe -p / -c joeFileList.csv -r realRun
The following code shows how to export files for user 'jdoe' from site site21.hostedcloud.com to directory 'cloudexport'.
php exportfs.php -d /cloudexport/ -u jdoe -p / -c joeFileList.csv -r realRun -h site21.hostedcloud.com
Exporting files for all users
The following code shows how to export files for all users to directory 'cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p / -c salesReportList.csv -r realRun
The following code shows how to export files for all users from site site21.hostedcloud.com to directory 'cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p / -c engineeringReportList.csv -r realRun -h site21.hostedcloud.com
Exporting files from a specific folder
The following code shows how to export files recursively from a specific cloud directory '/jdoe/folder1/' to the physical path '/cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/ -c joeCloudFiles.csv -r realRun
The following code shows how to export files recursively from a specific cloud directory '/jdoe/folder1/' from site site21.hostedcloud.com to the physical path '/cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/ -c joeFiles.csv-r realRun -h site21.hostedcloud.com
Note: While specifying the path, the value of user can be 'all' or the right user who owns the folder. Specifying a user who doesn't own the folder will result in the folder not getting exported.
Exporting a specific file
The following code shows how to export a specific cloud file '/jdoe/folder1/helloworld.txt' to the physical path '/cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/helloworld.txt -r realRun
The following code shows how to export a specific cloud file '/jdoe/folder1/helloworld.txt' from site site21.hostedcloud.com to the physical path '/cloudexport'.
php exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/helloworld.txt -r realRun -h site21.hostedcloud.com
Note: While specifying the path, the value of user can be 'all' or the right user who owns the file. Specifying a user who doesn't own the file will result in the file not getting exported.