Related links
Developer Resources
Trash
Trash helps you recover deleted file(s) / folder(s). This is an added protection for your mission critical data, that may be lost due to unintentional events.
Note:
By default file(s) / folder(s) deleted using
delete command will be moved to Trash. The file(s) / folder(s) present in Trash will automatically get deleted after a 30 day (this may change without notice) period.
Following operations are allowed with Trash.
1.
Download file(s) / folder(s) from trash
Use
--trash parameter / switch along with the
download command to download the file(s) / folder(s) from Trash.
Syntax:
idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --trash --files-from=< path of filelist file > <username>@<server address>::ibackup/ /<download location on your local computer>/
Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --trash --files-from=filelist john@<server address>::ibackup/ /C/Download/
2.
Move file(s) / folder(s) from Trash to its original location in your IDrive account.
Use
--moveto-original parameter / switch to move the file(s) / folder(s) from Trash to its original location in your IDrive account.
Syntax:
idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --moveto-original --files-from=< path of filelist file > <username>@<server address>::ibackup/
Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --moveto-original --files-from=filelist john@<server address>::ibackup/
3.
Delete file(s) / folder(s) permanently from Trash in your IDrive account.
Use
--deletefrom-trash parameter / switch to delete file(s) / folder(s) permanently from Trash in your IDrive account.
Note: Files / folders present in Trash get automatically deleted after a 30 day (this may change without notice) period.
Syntax:
idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --deletefrom-trash --files-from=< path of filelist file > <username>@<server address>::ibackup/
Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --deletefrom-trash --files-from=filelist john@<server address>::ibackup/
4.
Search file(s) / folder(s) inside Trash.
Use
--trash parameter / switch along with the
search command to view all the file(s) / folder(s) in Trash.
Syntax:
idevsutil --xml-output --password-file=<account password> --search --trash <username>@<server address>::ibackup/<enter the search phrase>
Code:
idevsutil --xml-output --password-file="MyPassword" --search --trash john@<server address>::ibackup/*.*
Common parameter / switch details
- --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.
- --files-from=PATH_OF_FILE_LIST_FILE
Reads list of file(s) / folder(s) that you wish to delete from 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 / Output management
- This section explains about the sample code execution and the output generated during file / folder transfer.
To move all file(s) / folder(s) inside “/C/Images/” from trash in your IDrive account
f
ilelist file content:
/C/Images/
Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --moveto-original --files-from=filelist john@<server address>::ibackup/
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).
Output:
Sample XML output:
<item op="moved successfully" fname="/C/Images/Image1.txt"/>
<item op="moved successfully" fname="/C/Images/"/>
<item tot_items_moved="2"/>
<item op_end="End of operation"/>
Description:
The following details are displayed during a trash operation:
- op
Move operation executed
- fname
Name of the file(s) / folder(s) moved.
- tot_items_moved
Total items moved
- op_end
Specifies the end of operation
You can make use of I / O redirection methods for redirecting IDrive EVS command line utility (idevsutil) output.