Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipelines Rsync only latest commits and changed files

Arjan Oskam
Contributor
January 23, 2018

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?

2 answers

0 votes
rossberenson July 4, 2024

Any update on a solution?

0 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2018

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

Arjan Oskam
Contributor
February 12, 2018

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?

Ben Joostens February 14, 2018

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
Arjan Oskam
Contributor
February 23, 2018

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?

mrobinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2018

@Arjan Oskam how did you resolve this

Arjan Oskam
Contributor
October 9, 2018

@mrobinson I never have been able to resolve this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events