| ascp: Transferring from the Command Line with Ascp |
143
3. How do I ensure that if the transfer is interrupted or fails to finish, it will resume without re-transferring
the files?
Use the
-k
flag to enable resume, and specify a resume rule:
-k 0
– Always re-transfer the entire file.
-k 1
– Compare file attributes and resume if they match, and re-transfer if they do not.
-k 2
– Compare file attributes and the sparse file checksums; resume if they match, and re-transfer if they do
not.
-k 3
– Compare file attributes and the full file checksums; resume if they match, and re-transfer if they do
not.
Corruption or deletion of the
.asp-meta
file associated with an incomplete transfer will often result in a
permanently unusable destination file even if the file transfer resumed and successfully transferred.
4. How does Aspera handle symbolic links?
The
ascp
command follows symbolic links by default. This can be changed using
--symbolic-
links=
method
with the following options:
•
follow
- Follow symbolic links and transfer the linked files. (Default)
•
copy
- Copy only the alias file. If a file with the same name is found at the destination, the symbolic link is
not copied.
•
copy+force
- Copy only the alias file. If a file (not a directory) with the same name is found at the
destination, the alias replaces the file. If the destination is a symbolic link to a directory, it's not replaced.
•
skip
- Skip symbolic links. Do not copy the link or the file it points to.
Important:
On Windows, the only option is
skip
.
Symbolic link handling also depends on the server configuration and the transfer direction. For more information,
see
on page 132.
5. What are my choices for overwriting files on the destination computer?
In
ascp
, you can specify the
--overwrite=
method
rule with the following method options:
•
never
- Never overwrite the file. However, if the parent folder is not empty, its access, modify, and change
times may still be updated.
•
always
- Always overwrite the file.
•
diff
- Overwrite the file if different from the source. If a complete file at the destination is the same as a file
on the source, it is not overwritten. Partial files are overwritten or resumed depending on the resume policy.
•
diff+older
- Overwrite the file if older and also different than the source. For example, if the destination
file is the same as the source, but with a different timestamp, it will not be overwritten. Plus, if the destination
file is different than the source, but newer, it will not be overwritten.
•
older
- Overwrite the file if its timestamp is older than the source timestamp.
Interaction with resume policy (-k):
If the overwrite method is
diff
or
diff+older
, difference is
determined by the resume policy (
-k {0|1|2|3}
). If
-k 0
or no
-k
is specified, the source and destination
files are always considered different and the destination file is always overwritten. If
-k 1
, the source and
destination files are compared based on file attributes (currently file size). If
-k 2
, the source and destination files
are compared based on sparse checksums. If
-k 3
, the source and destination files are compared based on full
checksums.