Skip to content

Commit

Permalink
Add rsync page
Browse files Browse the repository at this point in the history
  • Loading branch information
bennuttall committed Mar 15, 2014
1 parent 05e2460 commit dd78860
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
6 changes: 4 additions & 2 deletions remote-access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Sometimes you need access to a Raspberry Pi without connecting a monitor to it,

## Contents

- [SSH](ssh/README.md)
- Access the command line of the Pi from another computer
- [VNC](vnc/README.md)
- Remote access to the Pi's graphical interface, viewed in a window on another computer
- [SSH](ssh/README.md)
- Access the command line of the Pi from another computer
- [rsync](ssh/rsync.md)
- Syncronise folders between the Pi and another computer using `rsync` over SSH
- [Web Server](web-server/README.md)
- Set up a website or a web page to display some information about the Pi by from a web browser on another machine on the network or on the internet
25 changes: 25 additions & 0 deletions remote-access/ssh/rsync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# rsync

You can use the tool `rsync` to syncronise folders between computers. You might want to transfer some files from your desktop computer or laptop to your Pi, and for them to be kept up to date, or you might want the pictures taken by your Pi transferred to your computer automatically.

Using `rsync` over SSH allows you to transfer files to your computer automatically.

Here is an example of setting up the sync of a folder of pictures on your Pi to your computer:

On your computer, create a folder called `camera`:

```
mkdir camera
```

Look up the Pi's IP address by logging in to it and running `hostname -I`. In this example the Pi is creating a timelapse by capturing a photo every minute and saving the picture with a timestamp in the local folder `camera` on its SD card.

Now run the following command (replacing your own Pi's IP address):

```
rsync -avz -e ssh [email protected]:camera/ camera/
```

This will copy all files from the Pi's `camera` folder to your computer's new `camera` folder.

In order to keep the folders in sync, run this command in [cron](../../linux/cron.md).

0 comments on commit dd78860

Please sign in to comment.