Page tree
Skip to end of metadata
Go to start of metadata


FileCloud uses its own format to store files which will solve the file collision and name space issues in large deployments (For Ex: Universities and Large Enterprises).   This storage format is not human readable. But one can export the stored data to its original format using our Export tool.

The export tool provided by FileCloud lets administrator to export files of a particular user, export files for all users, files from a specific folder or a specific file.

 

Prerequisite

Enable MongoDB:

In Linux enter:

[root@cnfc php.d]# php -m | grep mongodb
mongodb
[root@cnfc php.d]#




In Windows enter:

C:\Windows\system32>C:\xampp\php\php.exe -m | findstr mongodb
mongodb

C:\Windows\system32>


If you do not get the above results, please Contact FileCloud Support.

Usage

The path to the exportfs.php file has been changed in FileCloud version 18.2.

From

var/www/resources/tools/fileutils

to

/WWWROOT/resources/tools/fileutils


Initializing backup tool
:~$ cd /WWWROOT/resources/tools/fileutils
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php
Missing export target path. Please use -d to specify the export target path.
Usage
------
php ./exportfs -d dir -u <user> -p <pathToExport> -h <hostname> -r realRun
where,
 [required] dir = export target directory
 [required] user = user account whose files are to be exported or 'all' to export all files
 [required] pathToExport = Specify file or folder that needs to be exported
 [optional] Site name = specify fully qualified name of the site to be exported in multisite installation. Omit the option for standalone or default site
 [optional] realRun = use string 'realRun' to perform actual export. Not specifying this does only simulation of files/folders export

Exporting files for single user

The following code shows how to export files for user 'jdoe' to directory 'cloudexport'.

Exporting single user files - Default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u jdoe -p / -r realRun

The following code shows how to export files for user 'jdoe' from site site21.hostedcloud.com to directory 'cloudexport'.

Exporting single user files - Non default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u jdoe -p / -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'.

Exporting all user files - Default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u all -p / -r realRun

The following code shows how to export files for all users from site site21.hostedcloud.com  to directory 'cloudexport'.

Exporting all user files - Non default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u all -p / -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'.

Exporting folder - Default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/ -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'.

Exporting folder - Default site
:/WWWROOT/resources/tools/fileutils$ sudo php ./exportfs.php -d /cloudexport/ -u all -p /jdoe/folder1/ -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'.

Exporting single file - Default site
:/WWWROOT/resources/tools/fileutils$ sudo 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'.

Exporting single file - Non default site
:/WWWROOT/resources/tools/fileutils$ sudo 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.

Windows Specific

Starting in FileCloud v17,  the following syntax applies. When running this script under Windows, replace the 'php' command with the full path of the php.exe (usually c:\xampp\php\php.exe)

Running export tool on Windows - dry run
c:\xampp\htdocs\resources\tools\fileutils> c:\xampp\php\php.exe exportfs.php -d <to path> -u <user> -p <from path> -h <hostname>
Running export tool on Windows - real run
c:\xampp\htdocs\resources\tools\fileutils> c:\xampp\php\php.exe exportfs.php -d <to path> -u <user> -p <from path> -h <hostname> -r realRun


  • No labels