rsync-deploy copying 2 folders

jurepetrovic June 15, 2022

When building, I get 2 distinct folders that I need to copy to the server environment. I need to copy them in specific places and I cannot copy the whole parent folder.

Is there a way to specify to copy 2 different folders to 2 different locations in rsync-deploy?

Or just invoke it 2 times?

 

Thanks,

Jure

1 answer

0 votes
Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 15, 2022

Hi @jurepetrovic 

Can you explain how this relates to Jira?

As for the rsync: are both folders in the same parent directory? And you want to copy only those 2 folders to a same parent directory on the target. Did I get that right?

It's probably easier to perform 2 separate rsync commands.
Or you could use the --include option and specify te folders you do want to sync . See the man page.
Something like: rsync --include='folder1' --include='folderB' <your other options>

jurepetrovic June 16, 2022

Hello @Charlie Misonne

thanks for your answer. It does not relate, however, I did not find bitbucket related community :( Sorry.

No, they are not in the same parent folder.

I ended up using 2 rsync commands without "deployment" tag, so I could copy twice to the same staging server.

Thanks for the idea, appreciate it.

Rgds,

Jure

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events