Update Kirby Folder via rsync

Hey!

I’m planning to update my kirby system folder via rsync and was wondering if anyone has had any experience with this.

Is it generally a good idea to update kirby this way?
My workflow is as follows:

  • local update Kirby via composer to newest version
  • check if the page works normally
  • update live Kirby folder via rsync »with flags(‘avz’)«
  • delete media folder via ftp

For example, one thing that comes to mind: with my configuration, rsync does not delete files but only overwrites them. Could that be an issue?

Thanks a lot!

I have used rsync to sync Kirby environments, it works fine, though generally I prefer to use git and composer on the target server.

You totally can get rsync to delete files if you want it to, I think it’s the --delete-after option

1 Like

Thank you :slight_smile:

if you like, you can tell me why you decided against rsync in favour of git. I am currently looking for a deploy method which I would like to implement for all customers in the future.

It might just come down to personal preference and familiarity really. The advantages I get from git are that ‘i’m using it anyway’ and it gives a clear view on what changes editors are making. But I know other people are using rsync happily.

Actually if you’re talking about just syncing the kirby /site folder - then I usually use composer for that, and the composer.lock is kept updated in git.

Ideally, you could use some kind of CI to check out and build the site on some kind of docker image that then probably rsyncs to live once various tests have passed, but that may be over-engineering.

It all depends, but a straight forward rsync will do the job!

1 Like