Pipelines Rsync only latest commits and changed files

Is there an easy way to just rsync files that were changed since the last commit?
Because now there is Pipelines Deployments and I do not like the fact that I am rsyncing my whole website while I only need a few files that were changed.

Does anyone know a way to do this?

1 answer

This widget could not be displayed.

Rsync is already incremental - it will only push (or pull) the difference between source and destination.

Yes, true, but since the environment that I am syncing to, has been updated last week (for example). And my Docker image has just been created. The files on the Docker images, are ALWAYS newer than the files on the environment that I want to sync to.

So I can not choose to just sync changed files, since every single file in my docker images, always has a newer date than the files on the server, since those were already there before I started the Docker images.

So how am I going to fix that?

If it is just the date that is an issue, you can add the -c flag to synchronize based on checksum.

 

 -c, --checksum              skip based on checksum, not mod-time & size

This still is not enough, I got this command right now:

rsync -hvrPtu --checksum --delete --filter="merge filter.txt" ../build/ $ACC_USER@$ACC_HOST:$ACC_PATH

with this in the filter.txt

P public_html/sites/default/files/***
P config/***
P config/**
P config/*
P config/
P config
P private_html/***
P private_html/**
P private_html/*
P private_html/
P private_html
+ public_html/***
+ config/***
- ***
- **.gitkeep

 But it deletes the whole domain directory, so including the private_html symlink and a whole lot more.

Also, when deploying a newer version of Drupal, it doesn't sync anything. Just some folders, and that while the whole core was changed.
Any other ideas?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

245 views 14 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you