Rake tasks for creating and deleting shares in Shares

Rake tasks are scripts that allow you to retrieve, delete or update information on your Shares server using the command line. Rake tasks can perform actions on user accounts, shares and nodes. This article describes the rake tasks available for creating and deleting shares. For more general information on Shares rake tasks see https://support.asperasoft.com/entries/95396498-Shares-rake-tasks.

Creating a share

The syntax for this rake task is the following:

Rake tasks must be run from within the appropriate location in the shares folder:
  • Linux Shares 1.8 and later: /opt/aspera/shares/u/shares/bin
  • Linux Shares earlier than 1.8: /opt/aspera/shares/u/shares
  • Windows: C:\Shares\www
Windows
rake data:share:create -- [options]

Shares 1.8+
./run rake data:share:create -- [options]

Shares earlier than 1.8
bundle exec rake data:share:create -- [options]

 

The available options are the following:

option description                                                                                      
--node_name The name of the node the share will be on (required).
--share_name The name the share will have (required).
--directory The directory path of the share (required).

 

Example

To create a share named ProjectABC on the node Aspera in the directory /Projects/ProjectABC, you would use the following:

rake data:share:create -- --node_name Aspera --share_name ProjectABC --directory /Projects/ProjectABC

 

Deleting a share

The syntax for this rake task is the following:

Rake tasks must be run from within the appropriate location in the shares folder:
  • Linux Shares 1.8 and later: /opt/aspera/shares/u/shares/bin
  • Linux Shares earlier than 1.8: /opt/aspera/shares/u/shares
  • Windows: C:\Shares\www
Windows
rake data:share:delete -- [options]

Shares 1.8+
./run rake data:share:delete -- [options]

Shares earlier than 1.8
bundle exec rake data:share:delete -- [options]

 

The available options are the following:

option description                                                                                      
--share_name The name of the share (required).

 

Example

To delete the share projects_2014, you would use the following:

rake data:share:delete -- --share_name projects_2014
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk