| Transferring from the Command Line | |
When used in conjunction with ascp commands, the Aspera Watch Service (asperawatchd) allows for fast detection and sending of new and deleted items. By comparing snapshots of the file directory it is watching, asperawatchd generates file lists for ascp commands for transfers requests. To generate snapshots and file lists, you must first configure and start asperawatchd. For more information, see Configuring the Aspera Watch Service.
> C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe --db-spec=datastore:host:port --tool daemon --get-by-path=C:\tmpFor example, if the directory set in the <watches> section is C:\data\D1, run this command:
> C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe --db-spec=redis:localhost:31415 --tool daemon --get-by-path=C:\data\D1
[aswatchadmin::daemon] Successfully retrieved watcher
[c=[uuid=e565a3e3-e25e-44c2-9d68-db1d59cef4c7,p=/data/D1,i_c=true,f=[],
in=[t=CHANNEL,n='wt:e565a3e3-e25e-44c2-9d68-db1d59cef4c7:input'],
in_b=[t=CHANNEL,n='wt:e565a3e3-e25e-44c2-9d68-db1d59cef4c7:broadcast'],
t=[c=[ss.max=10000],p=[p=[t=REDIS,db=wt:e565a3e3-e25e-44c2-9d68-db1d59cef4c7@localhost:31415],c=1]]]].
In
the results, find the string for the uuid (for example,
uuid=e565a3e3-e25e-44c2-9d68-db1d59cef4c7) and copy the uuid. > C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe --db-spec=redis:localhost:31415 --tool=instance --uuid=watch_uuid --snapshotFor example, to take a snapshot with the watcher with the uuid we retrieved in the previous section:
> C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe --db-spec=redis:localhost:31415 --tool=instance --uuid=e565a3e3-e25e-44c2-9d68-db1d59cef4c7 --snapshot [aswatchadmin::instance] Successfully created snapshot 1.
> C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe--db-spec datastore:host:port --tool tree --uuid=uuid_no --diff=snapshot_version:snapshot_version --format {\$PATH} --exclude-remove > C:\filelist
> ascp --file-list C:\filelist --source-prefix=C:\prefix --mode=send --user=username --host=host
For example:
> C:\Program Files (x86)\Aspera\Enterprise Server\bin\aswatchadmin.exe --db-spec redis:localhost:31415 --tool tree --uuid=e565a3e3-e25e-44c2-9d68-db1d59cef4c7 --diff=0:1 --format {\$PATH} --exclude-remove > C:\tmp
> ascp --file-list C:\tmp --source-prefix=C:\data\D1 --mode=send --user=aspera --host=10.0.0.1 C:\data\R2
file1 100% 10MB 9.7Mb/s 00:07
file2 100% 10MB 9.7Mb/s 00:16
file3 100% 10MB 9.7Mb/s 00:26
file4 100% 10MB 9.7Mb/s 00:33
file5 100% 10MB 9.7Mb/s 00:42
file6 100% 10MB 9.7Mb/s 00:51
Completed: 61440K bytes transferred in 52 seconds
(96454 bits/sec), in 6 files.