synchronize or keepuptodate

Advertisement

taylor.guistwite@gmail.com
Joined:
Posts:
3
Location:
Tallahassee, FL

synchronize or keepuptodate

First and foremost, thank you so much for this amazing piece of software and knowledgebase. With it and the extensive documentation, I've been able to automate a large piece of migrating our website to a managed cloud host.

We have an on-prem server used as a file share. Part of which we need to synchronize with our website. I have explored automating this "sync" with both synchronize and keepuptodate.

Keepuptodate does exactly what I want, however I'm worried about this use-case from a longevity perspective. This is not something I would feel comfortable setting and forgetting. I would like to stop and start my session every night at a specified time via Task Scheduler, however I'm not sure how to go about doing so.

Users are typically only adding content to our file share during business hours, so I could stop keepuptodate after close of business, and then start keepuptodate in the morning after running a synchronize command. If we need to add files to the server outside of this scheduled task, I can always just manually run the synchronization.

My other worry with using keepuptodate is I see there is a caution in the documentation regarding monitoring large numbers of directories.
Note that you will be warned if number of subdirectories to be watched exceeds 500. Watching for changes in large number of directories can significantly degrade the performance of your computer
We have ~3,400 directories, so I'm worried about potential issues with keeping a task of this size running all day. When you say it can significantly degrade performance, how excessive are we talking?

Synchronize also does exactly what I want, however I would need to run this via task scheduler almost every minute in order to make sure new files that are added to our on-prem file server are uploaded to our cloud share as soon as possible. For that reason, I'm leaning towards mainly relying on keepuptodate.

Another portion I'm unsure of is -preservertime. I see this is enabled by default with synchronize, but I don't see it listed as default behavior with keepuptodate. I noticed the -rawtransfersettings flag and it looks like I can just set this via -rawtransfersettings PreserveTimeDirs=1.

With all that being said, I would greatly appreciate any feedback or recommendations on the best way to proceed with this project.

Thanks,
Taylor

Reply with quote

Advertisement

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

Re: synchronize or keepuptodate

Imo, ~3000 directories should be ok on modern computer.
Preserving timestamp is always on for keepuptodate, it wouldn't work without it.

Reply with quote

taylor.guistwite@gmail.com
Joined:
Posts:
3
Location:
Tallahassee, FL

Thanks so much, Martin! We just got space allocated for our remote server, so I'm going to test the transfer today.

Do you know the best practice, or have a suggestion for, automating killing an SFTP session spawned by keepuptodate outside of the terminal? Specifically thinking if I wanted to kill it at a specified time.

Thanks,
Taylor

Reply with quote

martin
Site Admin
martin avatar

There's no clean way to externally terminate a WinSCP script.
You just have to kill the WinSCP process.

To synchronize, just use synchronize before keepuptodate.

Reply with quote

Advertisement

You can post new topics in this forum