After accidentally cloning a sexy repository, two college grad students decide to educate the newly created script and turn it into the perfect Plastic SCM replication command. (Source: Repli-Kate)
What RepliKate does
You can use repliKate for two purposes:
- Replicate a complete repository from one server to another.
- Replicate all the changes done inside a repository in a period of time.
Replicate a repository from zero
You can use the following command to migrate all the source repository content into a new one, all your branches, changesets, permissions, labels and so on will be replicated to the destination repository.
"replikate srcrepos@srcserver dstrepos@dstserver"
Remember that if you are a GUI guy you can always use the "Sync view" to achieve the same result.
Keeping your repositories synced
Here is where RepliKate can help you more, let's work with an example.
I have my central code repository in my "OmicronPersei8" server and I want to push periodicaly my new changes to my "Amphibios9" server, in order to keep "Amphibios9" server as a mirror/backup server.
First I need to replicate all the "OmicronPersei8" code repository to the "Amphibios9" server using repliKate, just like we did up there.
Now that I have the repository synced I need to replicate everyday all the new changes made into the "Amphibios9" repository, it's easy using the "Sync view" but it's also too much manually.
With repliKate you can use a Windows scheduled task (or Linux cron) to issue the following command every night:
"replikate srcrepos@srcserver dstrepos@dstserver --syncdate=yesterday"
As you can imagine this command will replicate all the branches with changesets created since yesterday. Running this command everyday will keep my mirror server updated.
Instead of the "yesterday" key word you can use a certain initial date, for example:
"replikate srcrepos@srcserver dstrepos@dstserver --syncdate=initialdate(Month/Day/Year)"
Run "repliKate.exe" to get the full help.
You can use this log4net configuration file to get the log info from the repliKate application, you need to place it in the same location as the replikate.exe file, it will generate a replicate.txt log file.
In a future blogpost I will explain you how to configure it to reveive email notifications when repliKate is not able to push the new changes.
Enjoy and customize it!