[ 
https://issues.jenkins-ci.org/browse/JENKINS-12891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161652#comment-161652
 ] 

bap commented on JENKINS-12891:
-------------------------------

This approach is only useful if you are only uploading a single large file.

If you are updating a directory, then you will want the entire directory update 
to be atomic, otherwise some users/application may see some files from the 
previous version and some from the current one.

This will probably require OS specific commands/flags (eg 'ln') or stoping 
services whilst the copy is in progress.

Should the files be copied to a temporary location (where) to minimise service 
downtime, or should the service/ access be stopped so that the files can be 
uploaded in place because the disk space is limited.

I'm not sure there is a sensible default behaviour to support this - it is up 
to you where you upload your files and scripts, and what you do before and 
after they have been transferred.
                
> Use a temporary name for the uploading files
> --------------------------------------------
>
>                 Key: JENKINS-12891
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-12891
>             Project: Jenkins
>          Issue Type: Improvement
>          Components: publish-over-ssh
>    Affects Versions: current
>            Reporter: Artem V. Navrotskiy
>            Assignee: bap
>
> Now when downloading large files for a long time at the destination may not 
> be a complete file. This can lead to various problems.
> To avoid this problem you need to load it under a temporary name and then 
> rename the.
> For example:
> {code}
> sftp> put bigfile.bin bigfile.bin~tmp123
> sftp> rename bigfile.bin~tmp123 bigfile.bin
> {code}
> Now you need to do:
>   - Script to rename a file in the working directory;
>   - Upload renamed files by ssh;
>   - Using "Exec command" to change cuurent directory to upload directory 
> (JENKINS-12890) and rename files back.
> This workaround looks like ugly :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to