scp.py
scp.py copied to clipboard
Request for enhancement support to download all regular file in case of there is non-regular file under one folder
In one server folder, there are several regular files and one pipe file (non-regular file). From client side, when we are using scp command to download the folder, though scp command prompts for the non-regular file and return value is 1, but it does not stop here and continue to download all the other remaining regular files . [root@rdcrh8vm2 ~]# scp -rP 5022 [email protected]:/var/log/ . [email protected]'s password: scp: /var/log/callstack_req_fifo: not a regular file wallander_finish 100% 0 0.0KB/s 00:00 messages 100% 107KB 1.0MB/s 00:00 messages.0 100% 200KB 966.3KB/s 00:00 last_reboot_reason 100% 22 8.7KB/s 00:00 _isam_action_collect_load_average_15sec.json_action_done 100% 0 0.0KB/s 00:00
While for Python module, if I am correct, Python scp will throw SCPException when detecting the file is non-regular file and it stops to continue to download other regular files. The behavior is not identical to native scp command.
For native scp command, in this case
- Ignore non-regular file and prompt..
- Download all regular files.
- Return value is 1.
We are expecting the same behavior like native scp command. Thanks!
Hello Guys,
Any progress on this? Thanks!
Regards,
I don't think anyone is working on this, but you can!
Let me have a try. The code change has been done. I will consider and test more cases.