Difference between revisions of "Backing Up via Rsync"

From WebOS Internals
Jump to navigation Jump to search
Line 19: Line 19:
 
=Requirements=
 
=Requirements=
  
*1 Linux-based computer (with access to the same WIFI/usbnet subnet as the Pre)
+
*1 Linux-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)
 
*On your Palm Pre, you need to have [[Portal:Accessing_Linux | access to linux]] and have completed the [[Next_steps|next steps]] after accessing linux.
 
*On your Palm Pre, you need to have [[Portal:Accessing_Linux | access to linux]] and have completed the [[Next_steps|next steps]] after accessing linux.
  
Line 26: Line 26:
 
=Procedure=
 
=Procedure=
  
==IMPORTANT==
+
==Notice==
Out of respect for Sprint, I will only document how to use rsync via WIFI/usbnet. '''I strongly disadvise against using rsync over EVDO (even through SSH). It is bandwidth intensive and we don't want Sprint complaining to Palm.'''
+
Out of respect for Sprint, I will only document how to use rsync via WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). It is bandwidth intensive and we don't want Sprint complaining to Palm.'''
  
 
==Setting up the Pre==
 
==Setting up the Pre==
1. Access your Pre via WIFI or usbnet.
+
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].
 +
 
 +
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer).
 +
 
 +
<pre><nowiki>
 +
pid file = /var/run/rsyncd.pid
 +
uid = root
 +
gid = root
 +
hosts allow = FILL_YOUR_HOST_IP_HERE
 +
hosts deny = *
 +
use chroot = no
 +
 
 +
[root]
 +
path = /
 +
</nowiki></pre>
 +
 
 +
3. To start the rsync daemon, type:
 +
rsync --daemon
 +
 
 +
==Setting up the host==
 +
1.
 +
 
 +
 
 +
 
 +
 
 +
*3a. (This is informational, skip to 'Setting up the host') To kill the rsync daemon, you will need to find the Process ID first, then kill the process.
 +
 
 +
#ps auxw | grep rsync
 +
root    11567  0.0  0.0  10480  624 ?        Ss  09:18  0:00 rsync --daemon
 +
root    11576  0.0  0.0  6124  640 pts/1    S+  09:18  0:00 grep rsync
 +
 
 +
Then kill the process
 +
kill 11567
 +
 
 +
 
 +
=Contributor(s)=
 +
*hopspitfire

Revision as of 17:22, 21 July 2009

Synopsis

The rsync remote-update protocol allows rsync to transfer just the differences between two sets of files across the network link, using an efficient checksum-search algorithm.

Some of the additional features of rsync are:

  • support for copying links, devices, owners, groups and permissions
  • exclude and exclude-from options similar to GNU tar
  • a CVS exclude mode for ignoring the same files that CVS would ignore
  • can use any transparent remote shell, including rsh or ssh
  • does not require root privileges
  • pipelining of file transfers to minimize latency costs
  • support for anonymous or authenticated rsync servers (ideal for mirroring)

Background & Purpose

Using rsync as a means to make full backups of the Pre, both for disaster recovery and convenience. I have been using Rsync as a means to backup all my Gentoo and FreeBSD servers, and even a 4TB volume on our NetApp. I was able to restore every system simply by using rsync to push the files to a new disk. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.

Requirements

  • 1 Linux-based computer (with access to the same WIFI or usbnet subnet as the Pre)
  • On your Palm Pre, you need to have access to linux and have completed the next steps after accessing linux.

The rsync binary is part of Palm's original package, so it is possible to make a wrap-around gui-based ipk for users who do not want access to linux.

Procedure

Notice

Out of respect for Sprint, I will only document how to use rsync via WIFI or usbnet. I strongly disadvise against using rsync over EVDO (even through SSH). It is bandwidth intensive and we don't want Sprint complaining to Palm.

Setting up the Pre

1. Access your Pre via WIFI or usbnet.

2. Edit /etc/rsyncd.conf and make sure you fill in the host IP address (your computer).

pid file = /var/run/rsyncd.pid
uid = root
gid = root
hosts allow = FILL_YOUR_HOST_IP_HERE
hosts deny = *
use chroot = no

[root]
 path = /

3. To start the rsync daemon, type:

rsync --daemon

Setting up the host

1.



  • 3a. (This is informational, skip to 'Setting up the host') To kill the rsync daemon, you will need to find the Process ID first, then kill the process.
#ps auxw | grep rsync 
root     11567  0.0  0.0  10480   624 ?        Ss   09:18   0:00 rsync --daemon
root     11576  0.0  0.0   6124   640 pts/1    S+   09:18   0:00 grep rsync

Then kill the process

kill 11567


Contributor(s)

  • hopspitfire