How to Manage Virtual Drives from Command Line. Map Amazon S3 Bucket from Command Line.
TntDrive
Bringing the Cloud Closer
 
Follow:
Share:

Command Line Interface

Starting from the version 5.1.1 TntDrive comes with a powerful command line interface that allows you to easily manage various program settings from the command line.

The executable file name is tntdrive-cli.exe and it is located in TntDrive installation folder (usually C:\Program Files\TntDrive)

The usage is shown below:

tntdrive-cli.exe /object command [parameters]

Available objects are: account, drive, license, ui, temp, throttling, logging, proxy.


Account

An Account object provides you the interface to manage storage accounts.

Available commands are add, update, show, delete, update-credentials


The add command allows you to add new storage account

To add new account please use the following syntax:

/account add name type [properties]

name - any name you would like to assign to your account

type - account type code as shown below:

   0: Amazon S3
   1: Amazon S3 Compatible Storage
   2: Amazon S3 in China
   3: Amazon S3 GovCloud
  33: Amazon S3 GovCloud (FIPS 140-2)
   4: Amazon S3 via EC2 IAM Role
  44: Amazon S3 via AssumeRole
   5: Amazon S3 (Credentials from Environment Variables)
   6: Amazon S3 (Credentials from AWS Config or Credential file)

properties - account type-specific properties:

  for Amazon S3, Amazon S3 in China, Amazon S3 GovCloud, Amazon S3 GovCloud (FIPS 140-2):
	access-key-id secret-access-key

  for Amazon S3 Compatible Storage:
	rest-endpoint access-key-id secret-access-key signature-version addressing-model

  for Amazon S3 via EC2 IAM Role, Amazon S3 (Credentials from Environment Variables):
	there are no account type specific properties

  for Amazon S3 via AssumeRole:
	role-arn [external-id] source-account

  for Amazon S3 (Credentials from AWS Config or Credential file):
	credentials-file credentials-file-profile

The command without [properties] returns account-specific properties description

Account-type specific help messages provide you more information about account-type specific properties.

For example the following command shows detailed help for parameters required for Amazon S3 Account:

tntdrive-cli /account add "test account" 0

To add new Amazon S3 account please use the following syntax:

/account add name 0 access-key-id secret-access-key

  name - any name you would like to assign to your account

  type - account type code (0 for Amazon S3)

  access-key-id - Your Access Key Id, more details at https://tntdrive.com/keys

  secret-access-key - Your Secret Access Key, more details at https://tntdrive.com/keys

tntdrive-cli /account add "test account" 0 AKIASAMPLEACCESSKEY RRll9kp9UgIi7HjKkLkOKmN9<..>

For Amazon S3-Compatible storage account:

tntdrive-cli /account add "test account" 1

To add new Amazon S3 Compatible Storage account please use the following syntax:

/account add name 1 rest-endpoint access-key-id secret-access-key signature-version addressing-model

  name - any name you would like to assign to your account

  type - account type code (1 for Amazon S3 Compatible Storage)

  rest-endpoint - S3-compatible API endpoint, for example: api.server.com or https://172.30.2.111:1784

  access-key-id - Your Access Key Id, more details at https://tntdrive.com/keys

  secret-access-key - Your Secret Access Key, more details at https://tntdrive.com/keys

  signature-version - Allowed values: 2 or 4. Version 4 is recommended when supported by the storage

  addressing-model - Specify 0 for Path style and 1 for Virtual hosted style

tntdrive-cli /account add wasabi 1 s3.wasabisys.com AKIASAMPLEACCESSKEY tVj5PY10zpklCN8YBRDjauuhNKqpY8MTr 4 1


The update command allows you to update account properties

To update account properties please use the following syntax:

/account update name-or-id property-name property-value

  name-or-id     - the name of the account you want to update,
                   you may also use account id

  property-name  - the name of the property you want to update,
                   to find the list of supported properties,
                   please check out the help for the 'add' command

  property-value - the new value for the property

Example:

tntdrive-cli /account update local-st rest-endpoint https://172.30.2.111:1784

or

tntdrive-cli /account update test-acc access-key-id AKIAT5ZWU75WMOVK3C5W


The show command displays account properties.

To show account details please use the following syntax:

/account show name-or-id

  name-or-id - the name of the account you want to show details for
               (wildcards supported), you may also use account id

Example:

tntdrive-cli /account show wasabi-test

Output:

Amazon S3 Compatible Storage
----------------------------------------
Name: wasabi-test
Id: 24e2e05d
REST Endpoint: s3.wasabisys.com
Region-specific Endpoint:
Signature Version: Signature V4
Addressing Model: Virtual hosted style
AccessKeyId: **********************
SecretAccessKey: **************************************
SSL/TLS: True


The delete command lets you delete one or multiple accounts

To delete account please use the following syntax:

/account delete name-or-id

  name-or-id - the name of the account you want to delete
               (wildcards supported), you may also use account id

Example:

tntdrive-cli /account delete wasabi-test


The update-credentials command updates account credentials from AWS config or credentials file, this could be useful when temporary credentials are not supported by your current account type, for example GovCloud account.

By running this command you can copy access keys and session token from the AWS config or credentials file to the account you added earlier.

To update account credentials from AWS config or credenials file:

/account update-credentials name-or-id config-file profile-name

  name-or-id   - the name of the account you want to update
                 credentials for, you may also use account id

  config-file  - path to AWS config or credentials file

  profile-name - profile name in AWS config or credentials file

Example:

tntdrive-cli /account update-credentials test %USERPROFILE%\.aws\config default


Drive

The Drive object provides you the interface to manage mapped drives.

Available commands are add, update, list, show, stop, start, reset-cache, delete.


The add command adds new mapped drive.

To add the drive please use the following syntax:

/drive add account-name bucket-name/path drive-letter

  account-name - the name of the account to assign to the drive

  bucket-name  - the name of the bucket to map

  path         - optional directory/subdirectory in the bucket

  drive-letter - drive letter to assign to the drive

Example:

tntdrive-cli /drive add "test account" mybucket/subdir E

Additional drive properties are available via the update command.


The update command lets you update various drive properties.

To update drive properties please use the following syntax:

/drive update drive-letter property-name property-value

  drive-letter   - the letter of the drive you want to update
                   specify * to set property for all drives

  property-name  - the name of the property you want to update

  property-value - the new value for the property

Supported properties are:

  account-name:       the name of the account assigned to the drive
  bucket-and-path:    bucket name and optional path, use the slash symbol (/) as a delimiter
  read-only:          enable read-only mode - true/false
  drive-type:         drive type, supported values are: Removable, Network
  drive-letter:       new drive letter for the drive, drive letter must be available (unused)
  enabled:            drive is enabled(active) - true/false
  network-access:     enable drive availability over the local network - true/false
  win32-attributes:   enable win32 attributes emulation (may work slow!) - true/false
  default-sc:         default storage class for all new files, supported values are:
                      STANDARD, STANDARD_IA, ONEZONE_IA, GLACIER, DEEP_ARCHIVE, INTELLIGENT_TIERING
  sse:                enable server-side encryption - true/false
  ta:                 enable transfer acceleration - true/false
  requester-pays:     enable the requester-pays feature - true/false
  cache-file-info:    enable file information caching - true/false
  cache-dir-listings: enable directory listings caching - true/false
  cache-rr:           enable read requests caching - true/false
  rr-max-file-size:   max file size in megabytes to cache read requests for
  rr-max-cache-size:  max read requests cache size on local disk in megabytes
  read-prefetching:   enable file prefetching for read requests - true/false
  rp-max-file-size:   max file size in megabytes to prefetch
  cache-ttl:          time to live of cached data in seconds

Example:

tntdrive-cli /drive update E bucket-and-path my-backups-bucket/documents/2021


The list command displays short summary for all mapped drives

To list all mapped drives please use the following syntax:

/drive list

Example:

tntdrive-cli /drive list

Output:

Letter  Path                  Account          Enabled
-------------------------------------------------------
O:      nas-backups-office    backups-acc      True
H:      nas-backups-home      backups-acc      True
E:      my-bucket-2021        test account     True


The show command displays all mapped drive properties

To show drive details please use the following syntax:

/drive show drive-letter

  drive-letter - the letter of the drive to show the details for,
                 specify * to show the details for all drives

Example:

tntdrive-cli /drive show P

Output:

Drive:
  AccountId: 5be6bc6b
  Path: nas-backups-office
  Id: 5832def1
  ReadOnly: False
  DriveType: Network
  DriveLetter: P:
  DriveLabel: nas-backups-office
  Enabled: True
  AllowNetworkAccess: False
  EnableWin32AttributesEmulation: False
  AmazonS3Options
    DefaultStorageClass: STANDARD
    Server-Side Encryption: False
    TranserAcceleration: False
    RequesterPays: False
  Caching:
    CacheFileInfo: True
    CacheDirListings: True
    CacheReadRequests: True
    ReadRequestsMaxFileSizeMb: 10
    ReadRequestsMaxCacheSizeMb: 1024
    ReadPrefetching: True
    ReadPrefetchingMaxFileSizeMb: 3
    TTLSeconds: 60


The stop and start commands let you stop/start the drive.

To start the drive please use the following syntax:

/drive start drive-letter

  drive-letter - the letter of the drive to start,
                 specify * to start all drives

To stop the drive please use the following syntax:

/drive stop drive-letter

  drive-letter - the letter of the drive to stop,
                 specify * to start all drives

Example:

tntdrive-cli /drive stop P

tntdrive-cli /drive start P


The reset-cache command allows you to reset all cached file information, directory listings and read requests cache for one or multiple mapped drives

To reset the cache for the drive please use the following syntax:

/drive reset-cache drive-letter

  drive-letter - the letter of the drive to reset cache for,
                 specify * to reset cache for all drives

Example:

tntdrive-cli /drive reset-cache P


Using the delete command you may delete one or multiple mapped drives

To delete the drive please use the following syntax:

/drive delete drive-letter

  drive-letter - the letter of the drive to delete,
                 specify * to delete all drives

Example:

tntdrive-cli /drive delete P


License

The License object provides you the interface to the licensing commands.

Available commands are show, get-hwid, activate, deactivate.


The show command displays current licensing status

To get current licensing status please use the following syntax:

/license show

Example:

tntdrive-cli /license show

Output:

TntDrive 5.1.2 - Registered version


The get-hwid command displays machine hardware ID

To get machine hardware ID please use the following syntax:

/license get-hwid

Example:

tntdrive-cli /license get-hwid

Output:

5bc633bcaea9109e1b3b78fa4bf9257c


The activate command allows you activate TntDrive license.

To activate the license please use the following syntax:

/license activate license-key

  license-key - TntDrive license key

Example:

tntdrive-cli /license activate YOUR-TNTDRIVE-LICENSE-KEY

Output:

Please wait, connecting activation server..
Your license has been successfully activated. Thank you!


The deactivate command allows you deactivate TntDrive license.

To deactivate the license please use the following syntax:

/license deactivate

Example:

tntdrive-cli /license deactivate

Output:

Please wait, connecting activation server..
Your license has been successfully deactivated.


UI

The UI object allows you to edit some UI settings

Available commands are hide-access-keys, hide-advanced-drive-properties.


The hide-access-keys command allows you enable masking for Access Key Id and Secret Access Key in Accounts Manager.

To disable access keys visibility in UI please use the following syntax:

/ui hide-access-keys true|false

  true|false - true to not show access keys in UI and false otherwise

Example:

tntdrive-cli /ui hide-access-keys true


The hide-advanced-drive-properties command allows you to hide the advanced drive properties link in UI.

To disable advanced drive properties visibility in UI please use the following syntax:

/ui hide-advanced-drive-properties true|false

  true|false - true to disable advanced drive properties and false otherwise

Example:

tntdrive-cli /ui hide-advanced-drive-properties true


Temp

The Temp object allows you to view/edit temp folder location

Available commands are get, set.


The get command displays current temp folder location.

To get current temp folder location please use the following syntax:

/temp get

Example:

tntdrive-cli /temp get

Output:

C:\Temp\TntDrive


The set command allows you to set new temp folder location

To set temo folder location please use the following syntax:

/temp set path

  path - new temp folder location

Example:

tntdrive-cli /temp set D:\TntDrive


Throttling

The Throttling object allows you to view/edit bandwidth throttling settings.

Available commands are get, set.


The get command displays current bandwidth throttling settings.

To get current bandwidth throttling settings please use type:

/throttling get

Example:

tntdrive-cli /throttling get

Output:

Disabled


The set command allows you to set new bandwidth throttling settings.

To set bandwidth throttling please use the following syntax:

/throttling set max-kbps-per-thread

  max-kbps-per-thread - max KB/s per thread (0 to disable throttling)

Example:

tntdrive-cli /throttling set 256


Logging

The Logging object allows you to view/edit logging settings.

Available commands are get, set.


The get command displays current logging settings.

To get current logging settings please use the following syntax:

/logging get

Example:

tntdrive-cli /logging get

Output:

Brief


The set command allows you to set new logging settings.

To set logging level please use the following syntax:

/logging set logging-level

logging-level - supported levels are: Verbose, Brief, WarningsAndErrors

Example:

tntdrive-cli logging set Verbose


Proxy

The Proxy object allows you to view/edit proxy settings.

Available commands are get, set.


The get command displays current proxy settings.

To get current proxy settings please use the following syntax:

/proxy get

Example:

tntdrive-cli /proxy get

Output:

DoNotUseProxy


The set command allows you to set new proxy settings.

To set proxy settings please use the following syntax:

/proxy set proxy-type [host port [username] [password] [domain]]

  proxy-type - supported types are: DoNotUseProxy, AutoDetect, UserDefined

  for UserDefined proxy type the following additional parameters required:

    host     - proxy address
    port     - proxy port

  if your proxy server requires authentication the following additional parameters required:

    username - username to authenticate on proxy server
    password - password to authenticate on proxy server
    domain   - (optional) domain to authenticate on proxy server

Example:

tntdrive-cli proxy set UserDefined 192.168.2.22 8080

Fully Functional Free Trial
Powered by Amazon Web Services
Social Connection
Mount Amazon S3 Drive
 
People like TntDrive!
Related Products
FastGlacier
Windows Client for Amazon Glacier - new low-cost storage for data archiving and backup.
Copyright © 2008-2024 Netsdk Software. All rights reserved.  Terms of Use.  Privacy Policy.  S3 Client.  Prevent RDP Brute-Force.