![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Gee! These Aren't Roasted!
![]() |
HowTo: Use Grsync and OpenSSH to sync your /home directory over a network
This tutorial will cover three things:
1) installing rsync, the Grsync GUI for rsync, and OpenSSH; 2) using rsync over an OpenSSH connection to syncronize your /home directory between two computers; and 3) excluding files you do not want to sync. Reason: I use a desktop and a laptop. I want to keep my /home directory on both identical, since I use the same software, etc., on both. OpenSSH provides a secure connection if you are syncing remotely over the internet, and is a really easy way to connect to another computer on your network. 1) Installing rsync, Grsync, and OpenSSH This is a piece of cake. Copy each of the following lines into the terminal: Code:
sudo apt-get install grsync sudo apt-get install openssh-server Click the +Add button and name your new session something like "50words /home" so you can easily get to it again. In the Source and Destination fields, enter the source--the computer you are going to sync from--in the first field. In my case: Code:
/home/50words/ In the destination field--the second field--enter the computer you are going to sync to. You have to do this using the computer's IP address. (If you don't know it, use the ifconfig command in a terminal. Or use System > Administration > Network Tools, and select the Network Device to see your IP Address next in the IPv4 row, if you are using Ubuntu.) Enter it like so: Code:
192.168.0.10:/home/50words/ Code:
-e ssh 3) Now, there are almost certainly some files you do not want to sync. For example, it is time-consuming to sync my Firefox cache, so I don't do it; I have a fast internet connection, so it does not really matter to me if it is synced up. It takes a lot of text to exclude multiple files and folders using the command line. It is easier to use a separate file to identify the files and folders to exclude. First, in the Additional options field, enter "--exclude" and the text file name in which you will list your files or directories to exclude. For example, here is my path to my exclusion file: Code:
--exclude-from=/home/50words/rsync-exclude.txt Code:
/home/50words/.mozilla/firefox/*/Cache /home/50words/.beagle Edit: If you want to do a two-way sync, instead of a one-way sync, give Unison a try. It works just as well over SSH, and does a fantastic job of two-way syncing.
__________________
Last edited by 50words; October 10th, 2008 at 11:24 AM.. |
|
|
|
| Bookmarks |
| Tags |
| how to, rsync, ssh |
| Thread Tools | |
| Display Modes | |
|
|