Link to home
Start Free TrialLog in
Avatar of Hamid Saeed
Hamid Saeed

asked on

SSH in linux

Hi all,
I send a large file with ssh in centos linux to another server,
Do exist way when connection loss, I can continue send file from disconnected time and not from first?

Thanks,
Avatar of Alexey Komarov
Alexey Komarov
Flag of Russian Federation image

Hi,
rsync resumes the download from where it stopped in a file,  You can use the command:

rsync -e ssh <myUser>@<myServer>:/<pathToRemoteFile>/<fileName> /<pathToLocalFile>/<fileName>
Avatar of Hamid Saeed
Hamid Saeed

ASKER

Hi dear,
Thanks ,
My file is generated from another command and I want send it without store on hdd,
1.How send output  run time to your command?
2. Do exist way for that I stop send and resume it I'm other time? Eg. There is exist a bottom?

Thanks,
Rsync will work even if the partial file was first send using another command. It doesn't care.

Use the option "--append" or "--append-verify" to accomplish this.

Rsync will compare the two files and will only transfer the remaing part of the file
Hi dear and thanks,
1. I want know how I send output a command that is a file without store on disk,  to below command:
rsync -e ssh <myUser>@<myServer>:/<pathToRemoteFile>/<fileName> /<pathToLocalFile>/<fileName>

2. You say:

Rsync will compare the two files and will only transfer the remaing part of the file.

 Mean if I have a file with size 100 gig, and rsync send half of it and occur a disconnected , and I run same command , it send remain part of 100gig ?

Thanks,
Rsync will indeed continue at the point it was interrupted. Even if the file was partially transferred using another tool, it can do this when using the right option.

I'm not sure what you mean by "a file without store on disk"?
If you are trying to send a file straight from being generated, then how could you resume it if the connection drops?
Without storing it locally there is no way to finish sending.  You would need to store locally, send it, and when you verify it is there, then delete the local....

All other methods of sending a live file will fail if the connection drops. The I/O would be disrupted, and the original program would error out.
Hi dears,
Thanks for your helps,
I test it and return,
ASKER CERTIFIED SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks