Menu

Implementing resume for large files

2018-04-20
2019-09-16
  • Tomas Cerskus

    Tomas Cerskus - 2018-04-20

    Hey there,

    I am currently using UFTP to transfer fairly large files. It can take days. Sometimes the clients lose internet connection or reboot.

    Any recommendations on where to start implementing a resume feature? Anything I should consider?

    Cheers,
    Tomas

     
  • Dennis Bush

    Dennis Bush - 2018-04-20

    Tomas,

    UFTP already had the ability to restart a failed file transfer.

    On the server (i.e. sender) side, pass the -f option to enable it to save state if one or more clients fails to receive all files in the session. When this happens, a file named "_group_{groupId}_restart" will be created, where {groupId} is the group ID of the failed session. You can then resume the session by passing the -F option and giving it the name of the restart file.

    When using the -F option, it is not necessary to specify which clients to send to via -H or the list of files to send as that information is contained in the restart file.

    On the client side, you'll need to pass the -T option to specify a temp directory. That allows the client to store any partially received files for a session as well as its state at the time the session dropped.

    Regards,
    Dennis

     

    Last edit: Dennis Bush 2018-04-20
  • Digarok

    Digarok - 2018-04-20

    Is it correct that with -T you can't specify a destination path, nor can you have multiple allowed destination paths?

     
  • Dennis Bush

    Dennis Bush - 2018-04-20

    You can specify a destination path on the server with -D when the client uses -T, but you can't specify an abolute path. And yes the client can't use -D with multiple paths when -T is used.

     
  • haralambop

    haralambop - 2019-09-16

    Hi Dennis,

    I am wondering why the restart mode flag (-f) cannot be used with the sync (-z)
    uftp -f -z ....
    Error: Cannot use restart mode and sync mode together

    Regards,
    Andreas

     
  • Dennis Bush

    Dennis Bush - 2019-09-16

    Andreas,

    Restart mode depends on the use of a temp directory where partially received files are stored, while sync mode depends on being able to overwrite the existing file directly which means a temp directory cannot be used.

    Regards,
    Dennis

     

Log in to post a comment.