Only transfer new or modified files during rsync deployment

Toby Onono
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!
September 15, 2023

I have a bitbucket pipeline setup to rsync to a server that hosts a Wordpress Site. The files on the server initially have a skeleton Wordpress site with a wp-config.php & wp-config-sample.php but all the other wp files will be sent over.

When I run my pipeline how do I make sure that the wp-config & wp-config-sample remain on the server after the pipeline has run but all new and modified files are sent. (I have wp-config.php in a gitignore so it's never sent over)

Pipeline code is here:

```

image: node:10.15.3

pipelines:
branches:
develop: #name of the development branch
- step:
script:
- pipe: atlassian/rsync-deploy:0.3.1
variables:
USER: $STAGING_USER
SERVER: ''
REMOTE_PATH: $STAGING_PATH
LOCAL_PATH: './'
EXTRA_ARGS: '-p --exclude-from=exclude-pipelines.txt'
- ssh $STAGING_USER@ "find $STAGING_FOLDER. -type d -print0 | xargs -0 chmod 0755"
- ssh $STAGING_USER@ "find $STAGING_FOLDER. -type f -print0 | xargs -0 chmod 0644"

```

 

I've found some of these flags but where do I incorporate them into what I have here?

 

Flags:  

rsync -h -v -r -P -t 

 

Thanks!

2 answers

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2023

@Toby Onono hi. Please, check this post.

Regards, Igor

0 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 17, 2023

Hi @Toby OnonoHave you tried incorporating it in EXTRA_ARGS?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events