Raspberry Pi-rsync (synchronous)

Source: Internet
Author: User

Raspberry Pi-rsync (synchronous)
You can use rsync to synchronize folders between different computers. You may want to transfer a file from your desktop computer or laptop to your Raspberry Pi and keep the file updated. Or, you want to automatically transfer the photos taken by Raspberry Pi to your computer.

Using SSH-based rsync allows you to automatically transfer files to your computer.

The following example sets the photo folder on your Raspberry Pi to automatically synchronize to your computer:

Create a directory named camera on your computer:

Mkdir camera
Log on to Raspberry Pi to run Hostname-ICommand to view the IP address of Raspberry Pi. In this example, Raspberry Pi has created a scheduled task, which takes a picture every minute and uses a timestamp to save the photo to the local camera directory on the SD card.

Run the following command on your computer (replace it with your own Raspberry Pi IP address ):
Rsync-avz-e ssh pi@192.168.1.10: camera/
This command will copy all files from the Raspberry Pi's camera folder to your computer's camera directory.

To maintain folder synchronization, run this command in cron.

Address: http://www.raspberrypi.org/documentation/remote-access/ssh/rsync.md

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.