Command line utility (idevsutil) APIs

Development made easy: IDrive EVS APIs

Copy paste

Copy file(s) / folder(s) from one location to another within the account on the server.
Syntax:
idevsutil --xml-output --password-file=<account password> --copy-within --pvt-key=<key file path> --files-from=<path of filelist file> <username>@<server address>::ibackup/<Destination path>
  • --pvt-key=PATH_OF_PVT_KEY_FILE
    Reads private encryption key for AES 256-bit encryption for all data transfers. Private encryption key length can vary from minimum of 4 characters to maximum of 255 characters. If you opt for the default encryption key during your IDrive account sign up then the use of the private encryption key is not required.
  • --password-file=PATH_OF_PSWD_FILE
    Reads account password from the specified file. Alternately, you can directly set the password using --password-file=<account password>
  • --files-from=PATH_OF_FILE_LIST_FILE
    Reads list of file(s) / folder(s) that you wish to copy in your IDrive account.
  • Username
    IDrive username. If you do not have a valid username Sign up with IDrive.
  • Server address:
    Use GetServerAddress API to retrieve the IDrive server address.
Code:
idevsutil --xml-output --password-file="MyPassword" --copy-within --pvt-key=enc_key --files-from =filelist john@<server address>::ibackup/TEMP/
Code / Output management
This section explains about the sample code execution and the output, generated during copy operation.

To copy all the file(s) / folder(s) from “/C/Images/” into TEMP folder on your IDrive account.

filelist file content:
/C/Images/
Code:
The following code will display status of file(s) / folder(s) specified in the filelist.
idevsutil --xml-output --password-file="MyPassword" --copy-within --pvt-key=enc_key --files-from =filelist john@<server address>::ibackup/TEMP>
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).

Output:
Below is a sample XML output generated for Copy operation:
<item op="copied" fname="/C/DATA/Features.xls"/>
<item op="copied" fname="/C/DATA/Image.jpg"/>
<item tot_items_copy="2"/>
<item op_end="End of operation"/>
Description:
Sample XML output:
  • op
    This attribute describes the operation
  • fname
    Name of the file path.
  • tot_items_copy
    Total items copied
  • op_end
    End of operation

You can make use of I / O redirection methods for redirecting IDrive EVS command line utility (idevsutil) output.

Refer code repository for more details on usage / implementation.