Feature request: Add `rsync` command
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 169
- Forks
- 30
- Avg merge
- 13h 43m
- Merged PRs (30d)
- 7
Description
- I've read the guidelines for Contributing to Roots Projects
- This request isn't a duplicate of an existing request
- This is not a personal support request that should be posted on the Roots Discourse community
Summary
Add trellis rsync which transfers files between remote servers and local machines.
Example:
rsync -aP --numeric-ids -e "ssh -T -o Compression=no -x -p 22" 'web@111.222.333.444:/srv/www/example.com/shared/uploads/' /Users/me/Desktop/example.com/uploads/
Discussion
What subcommands / flags should we provide?
For reference: AWS CLI provides 3 different subcommands for moving files between s3 buckets and local machines:
aws s3 mv <source> <destation>
aws s3 sync <source> <destation>
aws s3 cp <source> <destation>
Possible solutions:
# rsync without --delete
trellis rsync cp <env> <site> <source> <destation>
trellis rsync cp production example.com shared/uploads/ /Users/me/Desktop/example.com/uploads/
==> rsync -aP --numeric-ids -e "ssh -T -o Compression=no -x -p 22" 'web@111.222.333.444:/srv/www/example.com/shared/uploads/' /Users/me/Desktop/example.com/uploads/
trellis rsync cp --user=admin production example.com /absolute/path/ /Users/me/Desktop/example.com/uploads/
==> rsync -aP --numeric-ids -e "ssh -T -o Compression=no -x -p 22" 'admin@111.222.333.444:/absolute/path/' /Users/me/Desktop/example.com/uploads/
# rsync with --delete
trellis rsync sync <env> <site> <source> <destation>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the proposed trellis rsync cp and trellis rsync sync entry points with the CLI's existing command conventions. Resolve the supported arguments, flags, local and remote path behavior, and whether deletion is allowed; done means the selected command produces the documented rsync transfer for the shown examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, shell
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100