I'd like to use uSync to keep the staging server in sync with the production server content-wise. Is there built in support for running sync operations automatically on a schedule? I'm assuming not - can I use the API to trigger a "uSync Publisher - Sync" myself?
If not, I know I can use the commands tool to perform export/import steps manually. Just looking for a shortcut :)
but the main problem is the publish command is actually lots of individual requests between the client and site (we do this to bypass potential timeouts from long running imports).
I think in theory (although i have not tried this).
you could use the code in the uSyncCompleteCommandBase class in a controller and start the process off. you would just have to be aware of the possibility of long running requests...
I think we probably need to look at it we can push it all into a background task (it is on our roadmap) so it can be started and forgotten about.
you could also cook something up with the core uSync commands.
you could
- export the content to a folder (doesn't have to be usync/v9
- copy the folder to the other server
- perform an import from that folder.
Its simpler, and you loose some of the nuance around what is and isn't required for a sync that you get with publisher, but it might work if you can perform the copy between servers.
Run Sync/publisher on schedule
Hi,
I'd like to use uSync to keep the staging server in sync with the production server content-wise. Is there built in support for running sync operations automatically on a schedule? I'm assuming not - can I use the API to trigger a "uSync Publisher - Sync" myself?
If not, I know I can use the commands tool to perform export/import steps manually. Just looking for a shortcut :)
/Johan
Hi Johan,
Not really. although as you say the command tool does it.
if you look at the code in the command repo. you can see we have stuff to run a publish command.
https://github.com/Jumoo/uSync.CommandLine/tree/v11/main/uSync.Complete.Commands
but the main problem is the publish command is actually lots of individual requests between the client and site (we do this to bypass potential timeouts from long running imports).
I think in theory (although i have not tried this).
you could use the code in the uSyncCompleteCommandBase class in a controller and start the process off. you would just have to be aware of the possibility of long running requests...
I think we probably need to look at it we can push it all into a background task (it is on our roadmap) so it can be started and forgotten about.
you could - export the content to a folder (doesn't have to be usync/v9 - copy the folder to the other server - perform an import from that folder.
Its simpler, and you loose some of the nuance around what is and isn't required for a sync that you get with publisher, but it might work if you can perform the copy between servers.
Thanks for the speedy reply, I think I'll go the "manual" route then (commands tool), seems less error prone.
is working on a reply...