Skip to content

Instantly share code, notes, and snippets.

@hjanuschka
Created January 26, 2016 06:53
Show Gist options
  • Save hjanuschka/96cb3129fd0d839b7a56 to your computer and use it in GitHub Desktop.
Save hjanuschka/96cb3129fd0d839b7a56 to your computer and use it in GitHub Desktop.
### scp
Allows SCP file transfer.
**Upload file/folder:**
```ruby
scp(
host: "dev.januschka.com",
username: "root",
upload: {
src: "/root/dir1",
dst: "/tmp/new_dir"
}
)
```
**Download file/folder:**
```ruby
scp(
host: "dev.januschka.com",
username: "root",
download: {
src: "/root/dir1",
dst: "/tmp/new_dir"
}
)
```
### rsync
a wrapper around rsync, rsync is a tool that lets you synchronize files, including permissions and so on for a more detailed information about rsync please see ***rsync(1)*** manpage.
```ruby
rsync(
source: "root@host:/tmp/1.txt",
destination: "/tmp/local_file.txt"
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment