roots / roots/trellis-cli

Feature request: Add `rsync` command

Open
#109 9 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
169
Forks
30
Avg merge
13h 43m
Merged PRs (30d)
7

Description

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.