"option confirm newer" possible?

Advertisement

UweKeim
Donor
Joined:
Posts:
3
Location:
Göppingen

"option confirm newer" possible?

When doing a batch transfer with the "put" command, I can set

option confirm off

To overwrite all destination files. But I want to only overwrite files that were modified locally.

What I am looking for now is a batch equivalent to pressing the key for "only newer" when being asked whether to overwrite.

Is this possible?

Thanks
Uwe (https://www.magerquark.de)

Reply with quote E-mail

Advertisement

Made
Guest

Same question for me, is there a possibility for "overwrite if newer"

i want to do a little backup script. The archive can be several GiB. So it would be nice to have an option to skip files wich are not newer.

my script look like that:

open sftp://user:password@hostname.com
option confirm off
get files/backup.tgz C:\Backup\*
close
exit

thx

Reply with quote

crazykeynes
Joined:
Posts:
2

Re: "option confirm newer" possible?

martin wrote:

You can use synchronize command.

But, there is a big issue in my environment.

We found that when only 1 winscp session running, it can not use the all of the bandwidth.

When I use 2 session I can see the the network bandwidth are fully used. Then the transformation efficiency is improved.

Synchronize can use only 1 session. Get can use multiple session. But when using GET, it can only "never overwrite" or "overwrite all".

Please help me to resolve this issue.

Reply with quote

Advertisement

crazykeynes
Joined:
Posts:
2

Re: "option confirm newer" possible?

martin wrote:

There's no way to resolve your issue.

Really weird, in the GUI, "COPY newer only" is available, why just don't make it possible in scripting also?

Reply with quote

anton_k
Guest

Hello Prikryl,

Is there any chance to have this option for the next release? It would be really helpful. Since with synchronize command you can't use file mask, e.g.

synchronize remote C:\DATA\*.dat

Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

anton_k wrote:

Since with synchronize command you can't use file mask, e.g.

synchronize remote C:\DATA\*.dat
But you can do:

option include *.dat
synchronize remote C:\DATA

Reply with quote

anton_k
Guest

Unfortunately, I can't use -resume option with synchronize, which is crucial point for me.

Is there any other alternatives?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

anton_k wrote:

Unfortunately, I can't use -resume option with synchronize, which is crucial point for me.

Is there any other alternatives?
Not atm.

Reply with quote

Advertisement

Mac
Guest

Hi Martin,

Thanks for writing a great application. Turns out I also need a synchronize -resume option, do you know when this is to be incorporated?

Thanks, Mac.

Reply with quote

martin
Site Admin
martin avatar

Mac wrote:

Thanks for writing a great application. Turns out I also need a synchronize -resume option, do you know when this is to be incorporated?
What should "synchronize -resume" do?

Reply with quote

Advertisement

daniel55
Guest

Purpose of synchronize -resume

Hey prikryl,

We are looking at synchronizing a machine to a NAS, and synchronize does everything we need it to except resume file transfers. We need the external NAS to be exactly the same as the machine, so as files are added or removed, that needs to be reflected on the NAS. I need to be able to have an mirror copy every time we synchronize. I know that WinSCP does throttling, which allows us to transfer over long periods of time without chewing through bandwidth, but files are added and removed from the system constantly, so the script needs to be restarted frequently. If it is only partway through syncing a file and the script restarts, it has to start from the beginning of that file. "Put" is a good command, but we have to run synchronize after to make sure that everything is the same. Any ideas on an alternative to this issue?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Purpose of synchronize -resume

daniel55 wrote:

We are looking at synchronizing a machine to a NAS, and synchronize does everything we need it to except resume file transfers. We need the external NAS to be exactly the same as the machine, so as files are added or removed, that needs to be reflected on the NAS. I need to be able to have an mirror copy every time we synchronize. I know that WinSCP does throttling, which allows us to transfer over long periods of time without chewing through bandwidth, but files are added and removed from the system constantly, so the script needs to be restarted frequently. If it is only partway through syncing a file and the script restarts, it has to start from the beginning of that file. "Put" is a good command, but we have to run synchronize after to make sure that everything is the same. Any ideas on an alternative to this issue?
What about splitting the synchronization into subtasks (per directory or set of directories) and let the script always finish its job?

Reply with quote

Advertisement

You can post new topics in this forum