http://wiki.webos-internals.org/api.php?action=feedcontributions&user=Klktrk&feedformat=atomWebOS Internals - User contributions [en]2024-03-29T11:59:10ZUser contributionsMediaWiki 1.35.1http://wiki.webos-internals.org/index.php?title=Portal:Linux_Applications&diff=12496Portal:Linux Applications2011-01-04T00:39:50Z<p>Klktrk: Added link to searchable optware tool</p>
<hr />
<div>__notoc__<br />
{{reorganize|This page needs to be reorganized still.}}<br />
{{portal-header<br />
|The Pre runs a very standard Linux on a commonly available processor. Very soon after access was achieved to the Linux, the Optware team made the entire catalog of Optware packages available on the pre. <br />
<br />
More about the Optware project here: [http://www.nslu2-linux.org/wiki/Optware/Packages Optware Packages].<br />
<br />
You can view [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ a list of available packages] or [http://optwarefind.nslu2-linux.org/packages?Package%5BArchitecture%5D%3Darm search through them].<br />
<br />
The community has been busy porting other applications to the Pre. Some of those are listed, and have pages for them below.<br />
}}<br />
{{portal-three-columns<br />
|column1=<br />
* [[Portal:Linux_Applications_All|All]]<br />
* [[Portal:Linux_Applications_Business|Business]]<br />
* [[Portal:Linux_Applications_Communications|Communications]]<br />
* [[Portal:Linux_Applications_Entertainment|Entertainment]]<br />
<br />
|column2=<br />
* [[Portal:Linux_Applications_Food|Food]]<br />
* [[Portal:Linux_Applications_Games|Games]]<br />
* [[Portal:Linux_Applications_Lifestyle|Lifestyle]]<br />
* [[Portal:Linux_Applications_News|News]]<br />
<br />
|column3=<br />
* [[Portal:Linux_Applications_Social Networking|Social Networking]]<br />
* [[Portal:Linux_Applications_Tutorial|Tutorial]]<br />
* [[Portal:Linux_Applications_Utilities|Utilities]]<br />
* [[Portal:Linux_Applications_Productivity|Productivity]]<br />
}}<br />
{{portal-two-columns<br />
|column1=<br />
== Application Tutorials ==<br />
<br />
'''[[Portal:Accessing Linux|Follow the Accessing Linux Article First]]'''<br />
* [[Ad-Hoc_Networking|Ad-Hoc Networking]]<br />
* [[Ajaxterm]]<br />
* [[Apache]]<br />
* [[Tutorials_Linux_climm|climm Instant Messanger]]<br />
* [[Colorful_Bash_Prompt|Colorful Bash Prompt]]<br />
* [[Diff]]<br />
* [[Tutorials_Linux_DDNS_for_EVDO|Dynamic DNS for EVDO]]<br />
* [[DFBTerm DirectFB Terminal Emulator|DFBTerm DirectFB Terminal Emulator]] <br />
* [[Graphical Shell with WebShell|Graphical Shell with WebShell]] <br />
* [[GUI Text Editors|GUI Text Editors]] <br />
* [[HamachiVPN|HamachiVPN]] <br />
* [[How To Use "ls" In Color|How To Use "ls" In Color]] <br />
* [[Linux Tutorial Irssi|Linux Tutorial Irssi]]<br />
* [[Linux Tutorial Snownews|Linux Tutorial Snownews]]<br />
* [[Lighttpd|Lighttpd ]] <br />
* [[OpenVPN for Palm Pre|OpenVPN for Palm Pre]] <br />
* [[Tutorials_Linux_opt_on_loopback|/opt on loopback image on /media/internal]]<br />
* [[PalmVNC Terminal|PalmVNC Terminal]] <br />
* [[QEMU|QEMU]] <br />
* [[QEMU webOS Emulation|QEMU webOS Emulation]] <br />
* [[Running webOS in QEMU|Running webOS in QEMU]] <br />
* [[Replace "vi" with Fullscreen Text Editor "joe" or "nano"|Replace "vi" with Fullscreen Text Editor "joe" or "nano"]] <br />
* [[rTorrent]] <br />
* [[Setup Bash|Setup Bash]] <br />
* [[Samba Access|Samba Access]] <br />
* [[VNC (Virtual Network Computing)|VNC (Virtual Network Computing)]] <br />
* [[Vala Terminal|Vala Terminal]]<br />
* [[Application:VBA|VisualBoyAdvance]] an emulator of the Game Boy, Game Boy Color, and Game Boy Advance <br />
* [[Application:Stella|Stella]] Atari 2600 VCS Emulator<br />
* [[Wireless Music Sync with Amarok 1.4|Wireless Music Sync with Amarok 1.4]]<br />
* [[Application:Gnuboy|Gameboy emulator gnuboy on the Pre]]<br />
* [[SetupSquidTransparentProxy|Setup Squid transparent proxy]]<br />
* [[NES and GameBoy Emulators|NES and Gameboy Emulators Simple Setup]]<br />
* [[Tutorials_Linux_Emulator_Networking_Proxy_Firewall|Howto Use Emulator behind socks proxy]]<br />
<br />
== Want to write a tutorial and Add it? ==<br />
<br />
Just name the tutorial with<br />
<br />
"Tutorials Linux " + name<br />
<br />
Ex: Tutorials_Linux_Getting_Started<br /><br />
(spaces are the same thing as underscores)<br />
<br />
|column2=<br />
== Policies about adding Applications ==<br />
<br />
Your application can be any progress (Completed/Beta/Design Phase), just make sure you have a temporary name. For example if your application is called "Testing This":<br />
<br />
<source lang="text"><br />
{{portal-application-item<br />
|name=Asteroids<br />
|article=Asteroids<br />
|user=AWESOM-O<br />
|site=http://domain.com/asteroids/<br />
|description=This is a short description, leave screenshots<br />
and other details for the application page.<br />
<br />
}}<br />
</source><br />
<br />
<br />
Place this under the [[Portal:Linux Applications All|All Linux Application Portal]], and the category it goes under (for instance "Games" if it is a game). You can always change the applications name just make sure it is not taken and let us know on the [[Admin_Changes|Admin Changes]] page so we can delete the old application page (so others can use it).<br />
<br />
}}</div>Klktrkhttp://wiki.webos-internals.org/index.php?title=Portal:Linux_Applications&diff=12495Portal:Linux Applications2011-01-03T23:34:54Z<p>Klktrk: Undo revision 12494 by Klktrk (Talk)</p>
<hr />
<div>__notoc__<br />
{{reorganize|This page needs to be reorganized still.}}<br />
{{portal-header<br />
|The Pre runs a very standard Linux on a commonly available processor. Very soon after access was achieved to the Linux, the Optware team made the entire catalog of Optware packages available on the pre. <br />
<br />
More about the Optware project here: [http://www.nslu2-linux.org/wiki/Optware/Packages Optware Packages].<br />
<br />
You can view a list of available packages here: [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ List of Packages].<br />
<br />
The community has been busy porting other applications to the Pre. Some of those are listed, and have pages for them below.<br />
}}<br />
{{portal-three-columns<br />
|column1=<br />
* [[Portal:Linux_Applications_All|All]]<br />
* [[Portal:Linux_Applications_Business|Business]]<br />
* [[Portal:Linux_Applications_Communications|Communications]]<br />
* [[Portal:Linux_Applications_Entertainment|Entertainment]]<br />
<br />
|column2=<br />
* [[Portal:Linux_Applications_Food|Food]]<br />
* [[Portal:Linux_Applications_Games|Games]]<br />
* [[Portal:Linux_Applications_Lifestyle|Lifestyle]]<br />
* [[Portal:Linux_Applications_News|News]]<br />
<br />
|column3=<br />
* [[Portal:Linux_Applications_Social Networking|Social Networking]]<br />
* [[Portal:Linux_Applications_Tutorial|Tutorial]]<br />
* [[Portal:Linux_Applications_Utilities|Utilities]]<br />
* [[Portal:Linux_Applications_Productivity|Productivity]]<br />
}}<br />
{{portal-two-columns<br />
|column1=<br />
== Application Tutorials ==<br />
<br />
'''[[Portal:Accessing Linux|Follow the Accessing Linux Article First]]'''<br />
* [[Ad-Hoc_Networking|Ad-Hoc Networking]]<br />
* [[Ajaxterm]]<br />
* [[Apache]]<br />
* [[Tutorials_Linux_climm|climm Instant Messanger]]<br />
* [[Colorful_Bash_Prompt|Colorful Bash Prompt]]<br />
* [[Diff]]<br />
* [[Tutorials_Linux_DDNS_for_EVDO|Dynamic DNS for EVDO]]<br />
* [[DFBTerm DirectFB Terminal Emulator|DFBTerm DirectFB Terminal Emulator]] <br />
* [[Graphical Shell with WebShell|Graphical Shell with WebShell]] <br />
* [[GUI Text Editors|GUI Text Editors]] <br />
* [[HamachiVPN|HamachiVPN]] <br />
* [[How To Use "ls" In Color|How To Use "ls" In Color]] <br />
* [[Linux Tutorial Irssi|Linux Tutorial Irssi]]<br />
* [[Linux Tutorial Snownews|Linux Tutorial Snownews]]<br />
* [[Lighttpd|Lighttpd ]] <br />
* [[OpenVPN for Palm Pre|OpenVPN for Palm Pre]] <br />
* [[Tutorials_Linux_opt_on_loopback|/opt on loopback image on /media/internal]]<br />
* [[PalmVNC Terminal|PalmVNC Terminal]] <br />
* [[QEMU|QEMU]] <br />
* [[QEMU webOS Emulation|QEMU webOS Emulation]] <br />
* [[Running webOS in QEMU|Running webOS in QEMU]] <br />
* [[Replace "vi" with Fullscreen Text Editor "joe" or "nano"|Replace "vi" with Fullscreen Text Editor "joe" or "nano"]] <br />
* [[rTorrent]] <br />
* [[Setup Bash|Setup Bash]] <br />
* [[Samba Access|Samba Access]] <br />
* [[VNC (Virtual Network Computing)|VNC (Virtual Network Computing)]] <br />
* [[Vala Terminal|Vala Terminal]]<br />
* [[Application:VBA|VisualBoyAdvance]] an emulator of the Game Boy, Game Boy Color, and Game Boy Advance <br />
* [[Application:Stella|Stella]] Atari 2600 VCS Emulator<br />
* [[Wireless Music Sync with Amarok 1.4|Wireless Music Sync with Amarok 1.4]]<br />
* [[Application:Gnuboy|Gameboy emulator gnuboy on the Pre]]<br />
* [[SetupSquidTransparentProxy|Setup Squid transparent proxy]]<br />
* [[NES and GameBoy Emulators|NES and Gameboy Emulators Simple Setup]]<br />
* [[Tutorials_Linux_Emulator_Networking_Proxy_Firewall|Howto Use Emulator behind socks proxy]]<br />
<br />
== Want to write a tutorial and Add it? ==<br />
<br />
Just name the tutorial with<br />
<br />
"Tutorials Linux " + name<br />
<br />
Ex: Tutorials_Linux_Getting_Started<br /><br />
(spaces are the same thing as underscores)<br />
<br />
|column2=<br />
== Policies about adding Applications ==<br />
<br />
Your application can be any progress (Completed/Beta/Design Phase), just make sure you have a temporary name. For example if your application is called "Testing This":<br />
<br />
<source lang="text"><br />
{{portal-application-item<br />
|name=Asteroids<br />
|article=Asteroids<br />
|user=AWESOM-O<br />
|site=http://domain.com/asteroids/<br />
|description=This is a short description, leave screenshots<br />
and other details for the application page.<br />
<br />
}}<br />
</source><br />
<br />
<br />
Place this under the [[Portal:Linux Applications All|All Linux Application Portal]], and the category it goes under (for instance "Games" if it is a game). You can always change the applications name just make sure it is not taken and let us know on the [[Admin_Changes|Admin Changes]] page so we can delete the old application page (so others can use it).<br />
<br />
}}</div>Klktrkhttp://wiki.webos-internals.org/index.php?title=Portal:Linux_Applications&diff=12494Portal:Linux Applications2011-01-03T23:33:14Z<p>Klktrk: </p>
<hr />
<div>__notoc__<br />
{{reorganize|This page needs to be reorganized still.}}<br />
{{portal-header<br />
|The Pre runs a very standard Linux on a commonly available processor. Very soon after access was achieved to the Linux, the Optware team made the entire catalog of Optware packages available on the pre. <br />
<br />
More about the Optware project here: [http://www.nslu2-linux.org/wiki/Optware/Packages Optware Packages].<br />
<br />
You can [http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ view] or [http://optwarefind.nslu2-linux.org/packages?Package%5BArchitecture%5D=arm search] a list of available packages.<br />
<br />
The community has been busy porting other applications to the Pre. Some of those are listed, and have pages for them below.<br />
}}<br />
{{portal-three-columns<br />
|column1=<br />
* [[Portal:Linux_Applications_All|All]]<br />
* [[Portal:Linux_Applications_Business|Business]]<br />
* [[Portal:Linux_Applications_Communications|Communications]]<br />
* [[Portal:Linux_Applications_Entertainment|Entertainment]]<br />
<br />
|column2=<br />
* [[Portal:Linux_Applications_Food|Food]]<br />
* [[Portal:Linux_Applications_Games|Games]]<br />
* [[Portal:Linux_Applications_Lifestyle|Lifestyle]]<br />
* [[Portal:Linux_Applications_News|News]]<br />
<br />
|column3=<br />
* [[Portal:Linux_Applications_Social Networking|Social Networking]]<br />
* [[Portal:Linux_Applications_Tutorial|Tutorial]]<br />
* [[Portal:Linux_Applications_Utilities|Utilities]]<br />
* [[Portal:Linux_Applications_Productivity|Productivity]]<br />
}}<br />
{{portal-two-columns<br />
|column1=<br />
== Application Tutorials ==<br />
<br />
'''[[Portal:Accessing Linux|Follow the Accessing Linux Article First]]'''<br />
* [[Ad-Hoc_Networking|Ad-Hoc Networking]]<br />
* [[Ajaxterm]]<br />
* [[Apache]]<br />
* [[Tutorials_Linux_climm|climm Instant Messanger]]<br />
* [[Colorful_Bash_Prompt|Colorful Bash Prompt]]<br />
* [[Diff]]<br />
* [[Tutorials_Linux_DDNS_for_EVDO|Dynamic DNS for EVDO]]<br />
* [[DFBTerm DirectFB Terminal Emulator|DFBTerm DirectFB Terminal Emulator]] <br />
* [[Graphical Shell with WebShell|Graphical Shell with WebShell]] <br />
* [[GUI Text Editors|GUI Text Editors]] <br />
* [[HamachiVPN|HamachiVPN]] <br />
* [[How To Use "ls" In Color|How To Use "ls" In Color]] <br />
* [[Linux Tutorial Irssi|Linux Tutorial Irssi]]<br />
* [[Linux Tutorial Snownews|Linux Tutorial Snownews]]<br />
* [[Lighttpd|Lighttpd ]] <br />
* [[OpenVPN for Palm Pre|OpenVPN for Palm Pre]] <br />
* [[Tutorials_Linux_opt_on_loopback|/opt on loopback image on /media/internal]]<br />
* [[PalmVNC Terminal|PalmVNC Terminal]] <br />
* [[QEMU|QEMU]] <br />
* [[QEMU webOS Emulation|QEMU webOS Emulation]] <br />
* [[Running webOS in QEMU|Running webOS in QEMU]] <br />
* [[Replace "vi" with Fullscreen Text Editor "joe" or "nano"|Replace "vi" with Fullscreen Text Editor "joe" or "nano"]] <br />
* [[rTorrent]] <br />
* [[Setup Bash|Setup Bash]] <br />
* [[Samba Access|Samba Access]] <br />
* [[VNC (Virtual Network Computing)|VNC (Virtual Network Computing)]] <br />
* [[Vala Terminal|Vala Terminal]]<br />
* [[Application:VBA|VisualBoyAdvance]] an emulator of the Game Boy, Game Boy Color, and Game Boy Advance <br />
* [[Application:Stella|Stella]] Atari 2600 VCS Emulator<br />
* [[Wireless Music Sync with Amarok 1.4|Wireless Music Sync with Amarok 1.4]]<br />
* [[Application:Gnuboy|Gameboy emulator gnuboy on the Pre]]<br />
* [[SetupSquidTransparentProxy|Setup Squid transparent proxy]]<br />
* [[NES and GameBoy Emulators|NES and Gameboy Emulators Simple Setup]]<br />
* [[Tutorials_Linux_Emulator_Networking_Proxy_Firewall|Howto Use Emulator behind socks proxy]]<br />
<br />
== Want to write a tutorial and Add it? ==<br />
<br />
Just name the tutorial with<br />
<br />
"Tutorials Linux " + name<br />
<br />
Ex: Tutorials_Linux_Getting_Started<br /><br />
(spaces are the same thing as underscores)<br />
<br />
|column2=<br />
== Policies about adding Applications ==<br />
<br />
Your application can be any progress (Completed/Beta/Design Phase), just make sure you have a temporary name. For example if your application is called "Testing This":<br />
<br />
<source lang="text"><br />
{{portal-application-item<br />
|name=Asteroids<br />
|article=Asteroids<br />
|user=AWESOM-O<br />
|site=http://domain.com/asteroids/<br />
|description=This is a short description, leave screenshots<br />
and other details for the application page.<br />
<br />
}}<br />
</source><br />
<br />
<br />
Place this under the [[Portal:Linux Applications All|All Linux Application Portal]], and the category it goes under (for instance "Games" if it is a game). You can always change the applications name just make sure it is not taken and let us know on the [[Admin_Changes|Admin Changes]] page so we can delete the old application page (so others can use it).<br />
<br />
}}</div>Klktrkhttp://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&diff=12465Backing Up via Rsync2010-12-30T18:58:31Z<p>Klktrk: /* Contributor(s) */</p>
<hr />
<div>=Synopsis=<br />
<br />
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. <br />
<br />
Some of the additional features of rsync are:<br />
<br />
* support for copying links, devices, owners, groups and permissions<br />
* exclude and exclude-from options similar to GNU tar<br />
* a CVS exclude mode for ignoring the same files that CVS would ignore<br />
* can use any transparent remote shell, including rsh or ssh<br />
* does not require root privileges<br />
* pipelining of file transfers to minimize latency costs<br />
* support for anonymous or authenticated rsync servers (ideal for mirroring)<br />
<br />
=Background & Purpose=<br />
<br />
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/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.<br />
<br />
=Requirements=<br />
<br />
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)<br />
*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.<br />
<br />
The Unix-based computer will be consistently referred to as the "host".<br />
<br />
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.<br />
<br />
=Backup Procedure=<br />
<br />
==Notice==<br />
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.<br />
<br />
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''<br />
<br />
==Quick Overview==<br />
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.<br />
<br />
2. The host will be set up to download the Pre's files.<br />
<br />
3. The transfer will take place.<br />
<br />
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.<br />
<br />
==Setting up the Pre==<br />
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].<br />
<br />
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_HOST_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[root]<br />
path = /<br />
<br />
<br />
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
rsync --daemon && /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT<br />
</source><br />
<br />
==Setting up the host==<br />
1. Make sure you are the root user.<br />
<source lang=bash><br />
sudo -i<br />
</source><br />
<br />
or<br />
<br />
<source lang=bash><br />
su -l<br />
</source><br />
<br />
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''<br />
<source lang=bash><br />
mkdir /media/pre-backup<br />
</source><br />
<br />
==Running the transfer==<br />
===On the host===<br />
<br />
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after "-stats" in the command (in Step 3). You will need to do this for every directory you wish to NOT include in the transfer.<br />
<br />
2. '''1st time:''' If this is the first time running the backup, make sure to create the /sys and /proc directories (we're excluding them in the backup, but the directory needs to be there for the filesystems to mount correctly). Replace /media/pre-backup with the backup directory.<br />
<br />
mkdir /media/pre-backup/sys /media/pre-backup/proc<br />
<br />
3. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your pre'''<br />
rsync -HrlptgoDPvvS --force --delete --del --stats --exclude=/sys --exclude=/proc rsync://root@$IPADDRESS/root/ /media/pre-backup/<br />
</source><br />
<br />
3a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.<br />
<br />
==Disabling the rsync daemon on the Pre==<br />
<br />
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.<br />
<source lang=bash><br />
ps auxw | grep rsync <br />
root 11567 0.0 0.0 10480 624 ? Ss 09:18 0:00 rsync --daemon<br />
root 11576 0.0 0.0 6124 640 pts/1 S+ 09:18 0:00 grep rsync (IGNORE THIS ONE)<br />
</source><br />
<br />
Then kill the process:<br />
<source lang=bash><br />
kill 11567<br />
</source><br />
<br />
=Restore Procedure=<br />
==Quick Overview==<br />
1. Set up the host's rsync daemon<br />
<br />
2. Gain access to the Pre's Linux.<br />
<br />
3. Transfer the backed-up files to the pre and pray it works.<br />
<br />
==Setting up the host==<br />
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[pre-backup]<br />
path = /media/pre-backup/<br />
<br />
<br />
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)<br />
<source lang=bash><br />
rsync --daemon<br />
</source><br />
<br />
==Setting up the Pre and restoring==<br />
<br />
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].<br />
<br />
1. Access the Pre via WIFI or usbnet.<br />
<br />
2. Turn off the services while we restore all the files.<br />
<source lang=bash><br />
/sbin/initctl list | grep running | grep -v novacomd | grep -v pmklogd | grep -v pmsyslogd | awk '{ print $2 }' | while read serviceName ; do /sbin/initctl stop $serviceName ; done<br />
</source><br />
<br />
'''Note from user: killing all services except the ones listed above will kill your wifi connection. I was unable to attempt a restore without leaving all the services running, as I couldn't figure out the magic combination of supporting services that needed to be grep -v'd in order to allow the wifi network to keep running.'''<br />
<br />
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre. Exclude the cryptofs as this will be restored via its target "/media/internal/.palm", the other excluded directories should not or cannot be overwritten.<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
cd /<br />
mount -o remount,rw /<br />
mount -o remount,rw /boot<br />
mount -o remount,rw /media/internal<br />
rsync -HrlptgoDvvS --force --delete --del --stats --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/media/cryptofs rsync://root@$IPADDRESS/pre-backup/ /<br />
</source><br />
'''Note from user: This process would work up to a point and then silently fail. I think it was the novaterm connection that would bail on me. I'm wondering if it would actually restore successfully if the rsync command would be proceeded by a `nohup`.'''<br />
<br />
3a. If you have any "Out of Space" issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''<br />
<br />
3b. It might also help to use a temporary directory for the copy with ''--temp-dir=/media/internal/tmp'', before settings this option, create the directory ''mkdir /media/internal/tmp''.<br />
<br />
4. Reboot immediately and pray it works.<br />
<source lang=bash><br />
reboot<br />
</source><br />
<br />
=Development/Improvement Ideas=<br />
*'''I need more people to test the restore process and get back to me with suggestions.'''<br />
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).<br />
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.<br />
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.<br />
* Would be nice to be able to have it run at a low priority and not kill any ssh connections. Have tried renicing the rsync daemons but has had no affect.<br />
<br />
=Contributor(s)=<br />
*hopspitfire<br />
*NetWhiz<br />
*klktrk</div>Klktrkhttp://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&diff=12464Backing Up via Rsync2010-12-30T18:57:56Z<p>Klktrk: /* Setting up the Pre and restoring */</p>
<hr />
<div>=Synopsis=<br />
<br />
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. <br />
<br />
Some of the additional features of rsync are:<br />
<br />
* support for copying links, devices, owners, groups and permissions<br />
* exclude and exclude-from options similar to GNU tar<br />
* a CVS exclude mode for ignoring the same files that CVS would ignore<br />
* can use any transparent remote shell, including rsh or ssh<br />
* does not require root privileges<br />
* pipelining of file transfers to minimize latency costs<br />
* support for anonymous or authenticated rsync servers (ideal for mirroring)<br />
<br />
=Background & Purpose=<br />
<br />
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/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.<br />
<br />
=Requirements=<br />
<br />
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)<br />
*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.<br />
<br />
The Unix-based computer will be consistently referred to as the "host".<br />
<br />
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.<br />
<br />
=Backup Procedure=<br />
<br />
==Notice==<br />
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.<br />
<br />
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''<br />
<br />
==Quick Overview==<br />
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.<br />
<br />
2. The host will be set up to download the Pre's files.<br />
<br />
3. The transfer will take place.<br />
<br />
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.<br />
<br />
==Setting up the Pre==<br />
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].<br />
<br />
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_HOST_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[root]<br />
path = /<br />
<br />
<br />
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
rsync --daemon && /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT<br />
</source><br />
<br />
==Setting up the host==<br />
1. Make sure you are the root user.<br />
<source lang=bash><br />
sudo -i<br />
</source><br />
<br />
or<br />
<br />
<source lang=bash><br />
su -l<br />
</source><br />
<br />
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''<br />
<source lang=bash><br />
mkdir /media/pre-backup<br />
</source><br />
<br />
==Running the transfer==<br />
===On the host===<br />
<br />
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after "-stats" in the command (in Step 3). You will need to do this for every directory you wish to NOT include in the transfer.<br />
<br />
2. '''1st time:''' If this is the first time running the backup, make sure to create the /sys and /proc directories (we're excluding them in the backup, but the directory needs to be there for the filesystems to mount correctly). Replace /media/pre-backup with the backup directory.<br />
<br />
mkdir /media/pre-backup/sys /media/pre-backup/proc<br />
<br />
3. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your pre'''<br />
rsync -HrlptgoDPvvS --force --delete --del --stats --exclude=/sys --exclude=/proc rsync://root@$IPADDRESS/root/ /media/pre-backup/<br />
</source><br />
<br />
3a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.<br />
<br />
==Disabling the rsync daemon on the Pre==<br />
<br />
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.<br />
<source lang=bash><br />
ps auxw | grep rsync <br />
root 11567 0.0 0.0 10480 624 ? Ss 09:18 0:00 rsync --daemon<br />
root 11576 0.0 0.0 6124 640 pts/1 S+ 09:18 0:00 grep rsync (IGNORE THIS ONE)<br />
</source><br />
<br />
Then kill the process:<br />
<source lang=bash><br />
kill 11567<br />
</source><br />
<br />
=Restore Procedure=<br />
==Quick Overview==<br />
1. Set up the host's rsync daemon<br />
<br />
2. Gain access to the Pre's Linux.<br />
<br />
3. Transfer the backed-up files to the pre and pray it works.<br />
<br />
==Setting up the host==<br />
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[pre-backup]<br />
path = /media/pre-backup/<br />
<br />
<br />
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)<br />
<source lang=bash><br />
rsync --daemon<br />
</source><br />
<br />
==Setting up the Pre and restoring==<br />
<br />
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].<br />
<br />
1. Access the Pre via WIFI or usbnet.<br />
<br />
2. Turn off the services while we restore all the files.<br />
<source lang=bash><br />
/sbin/initctl list | grep running | grep -v novacomd | grep -v pmklogd | grep -v pmsyslogd | awk '{ print $2 }' | while read serviceName ; do /sbin/initctl stop $serviceName ; done<br />
</source><br />
<br />
'''Note from user: killing all services except the ones listed above will kill your wifi connection. I was unable to attempt a restore without leaving all the services running, as I couldn't figure out the magic combination of supporting services that needed to be grep -v'd in order to allow the wifi network to keep running.'''<br />
<br />
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre. Exclude the cryptofs as this will be restored via its target "/media/internal/.palm", the other excluded directories should not or cannot be overwritten.<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
cd /<br />
mount -o remount,rw /<br />
mount -o remount,rw /boot<br />
mount -o remount,rw /media/internal<br />
rsync -HrlptgoDvvS --force --delete --del --stats --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/media/cryptofs rsync://root@$IPADDRESS/pre-backup/ /<br />
</source><br />
'''Note from user: This process would work up to a point and then silently fail. I think it was the novaterm connection that would bail on me. I'm wondering if it would actually restore successfully if the rsync command would be proceeded by a `nohup`.'''<br />
<br />
3a. If you have any "Out of Space" issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''<br />
<br />
3b. It might also help to use a temporary directory for the copy with ''--temp-dir=/media/internal/tmp'', before settings this option, create the directory ''mkdir /media/internal/tmp''.<br />
<br />
4. Reboot immediately and pray it works.<br />
<source lang=bash><br />
reboot<br />
</source><br />
<br />
=Development/Improvement Ideas=<br />
*'''I need more people to test the restore process and get back to me with suggestions.'''<br />
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).<br />
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.<br />
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.<br />
* Would be nice to be able to have it run at a low priority and not kill any ssh connections. Have tried renicing the rsync daemons but has had no affect.<br />
<br />
=Contributor(s)=<br />
*hopspitfire<br />
*NetWhiz</div>Klktrkhttp://wiki.webos-internals.org/index.php?title=Backing_Up_via_Rsync&diff=12463Backing Up via Rsync2010-12-30T18:56:28Z<p>Klktrk: user experience with restore</p>
<hr />
<div>=Synopsis=<br />
<br />
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. <br />
<br />
Some of the additional features of rsync are:<br />
<br />
* support for copying links, devices, owners, groups and permissions<br />
* exclude and exclude-from options similar to GNU tar<br />
* a CVS exclude mode for ignoring the same files that CVS would ignore<br />
* can use any transparent remote shell, including rsh or ssh<br />
* does not require root privileges<br />
* pipelining of file transfers to minimize latency costs<br />
* support for anonymous or authenticated rsync servers (ideal for mirroring)<br />
<br />
=Background & Purpose=<br />
<br />
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/array. Using a special string of commands, rsync backups are nearly as depth-oriented as 'dd', while still being much more convenient.<br />
<br />
=Requirements=<br />
<br />
*1 Unix-based computer (with access to the same WIFI or [[USBnet_networking_setup | usbnet]] subnet as the Pre)<br />
*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.<br />
<br />
The Unix-based computer will be consistently referred to as the "host".<br />
<br />
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.<br />
<br />
=Backup Procedure=<br />
<br />
==Notice==<br />
The backup method has been tested, but there are '''no guarantees''' explicitly or implicitly given for data replication and retention. These tools have worked exceptionally well for me, but they might not work for you.<br />
<br />
Out of respect for Sprint, I will only document how to use rsync over WIFI or [[USBnet_networking_setup | usbnet]]. '''I strongly disadvise against using rsync over EVDO (even through SSH). This process is bandwidth intensive and we don't want Sprint complaining to Palm.'''<br />
<br />
==Quick Overview==<br />
1. We will set up the rsync daemon on the Palm Pre and make it acccessible by the host.<br />
<br />
2. The host will be set up to download the Pre's files.<br />
<br />
3. The transfer will take place.<br />
<br />
4. The daemon on the Pre will be killed to prevent anyone else from gaining access.<br />
<br />
==Setting up the Pre==<br />
1. Access your Pre via WIFI or [[USBnet_networking_setup | usbnet]].<br />
<br />
2. Edit '''/etc/rsyncd.conf''' and make sure you fill in the host IP address (your computer)<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_HOST_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[root]<br />
path = /<br />
<br />
<br />
3. Start the rsync daemon and allow the rsync daemon to communicate with the host. Make sure you fill in the host IP address (your computer):<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
rsync --daemon && /usr/sbin/iptables -I INPUT 1 -p TCP --dport 873 -s $IPADDRESS -j ACCEPT<br />
</source><br />
<br />
==Setting up the host==<br />
1. Make sure you are the root user.<br />
<source lang=bash><br />
sudo -i<br />
</source><br />
<br />
or<br />
<br />
<source lang=bash><br />
su -l<br />
</source><br />
<br />
2. On the host, you will need to create a directory where the Palm Pre will back up the files. My example will be '''/media/pre-backup'''<br />
<source lang=bash><br />
mkdir /media/pre-backup<br />
</source><br />
<br />
==Running the transfer==<br />
===On the host===<br />
<br />
1. If you want to exclude any directories you are already backing up (or simply don't want to include), add --exclude=/path/to/your/dir after "-stats" in the command (in Step 3). You will need to do this for every directory you wish to NOT include in the transfer.<br />
<br />
2. '''1st time:''' If this is the first time running the backup, make sure to create the /sys and /proc directories (we're excluding them in the backup, but the directory needs to be there for the filesystems to mount correctly). Replace /media/pre-backup with the backup directory.<br />
<br />
mkdir /media/pre-backup/sys /media/pre-backup/proc<br />
<br />
3. Fill your IP Address in the command below, along with your excludes (if you have any), and begin the transfer from the host computer. '''Make sure to set the correct backup directory (if you deviated from /media/pre-backup), otherwise you could overwrite data on your host machine.'''<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your pre'''<br />
rsync -HrlptgoDPvvS --force --delete --del --stats --exclude=/sys --exclude=/proc rsync://root@$IPADDRESS/root/ /media/pre-backup/<br />
</source><br />
<br />
3a. Every time you run the transfer, it will retain the exact same file-structure of the Pre, only deleting files that don't exist and only sending files that have changed.<br />
<br />
==Disabling the rsync daemon on the Pre==<br />
<br />
1. You need to disable the rsync daemon on the Pre to prevent anyone from gaining access to your files. To kill the rsync daemon, you will need to find the Process ID first, then kill the process.<br />
<source lang=bash><br />
ps auxw | grep rsync <br />
root 11567 0.0 0.0 10480 624 ? Ss 09:18 0:00 rsync --daemon<br />
root 11576 0.0 0.0 6124 640 pts/1 S+ 09:18 0:00 grep rsync (IGNORE THIS ONE)<br />
</source><br />
<br />
Then kill the process:<br />
<source lang=bash><br />
kill 11567<br />
</source><br />
<br />
=Restore Procedure=<br />
==Quick Overview==<br />
1. Set up the host's rsync daemon<br />
<br />
2. Gain access to the Pre's Linux.<br />
<br />
3. Transfer the backed-up files to the pre and pray it works.<br />
<br />
==Setting up the host==<br />
1. Edit '''/etc/rsyncd.conf''' (or '''/usr/local/etc/rsyncd.conf''' for FreeBSD). Check your documentation. Be sure to fill in the Pre's IP Address, and set the correct directory for the Pre backup (my example will be '''/media/pre-backup''').<br />
<br />
pid file = /var/run/rsyncd.pid<br />
uid = root<br />
gid = root<br />
hosts allow = '''FILL_YOUR_PALM_PRE_IP_HERE'''<br />
hosts deny = *<br />
use chroot = no<br />
<br />
[pre-backup]<br />
path = /media/pre-backup/<br />
<br />
<br />
2. Start the rsync daemon (you can use an init script, I'm using the command below just for simplicity. Check your documentation)<br />
<source lang=bash><br />
rsync --daemon<br />
</source><br />
<br />
==Setting up the Pre and restoring==<br />
<br />
A. For the scope of this guide, the requirements above still apply for the Palm Pre: you need to have [[Portal:Accessing_Linux | access to linux]].<br />
<br />
1. Access the Pre via WIFI or usbnet.<br />
<br />
2. Turn off the services while we restore all the files.<br />
<source lang=bash><br />
/sbin/initctl list | grep running | grep -v novacomd | grep -v pmklogd | grep -v pmsyslogd | awk '{ print $2 }' | while read serviceName ; do /sbin/initctl stop $serviceName ; done<br />
</source><br />
<br />
'''Note: killing all services except the ones listed above will kill your wifi connection. I was unable to attempt a restore without leaving all the services running, as I couldn't figure out the magic combination of supporting services that needed to be grep -v'd in order to allow the wifi network to keep running.'''<br />
<br />
3. Fill your IP Address in the command below, and start the transfer. This command will take everything from your Host system and overwrite '''EVERYTHING''' on the Pre. Exclude the cryptofs as this will be restored via its target "/media/internal/.palm", the other excluded directories should not or cannot be overwritten.<br />
<source lang=bash><br />
export IPADDRESS='''enter the IP Address of your host'''<br />
cd /<br />
mount -o remount,rw /<br />
mount -o remount,rw /boot<br />
mount -o remount,rw /media/internal<br />
rsync -HrlptgoDvvS --force --delete --del --stats --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/media/cryptofs rsync://root@$IPADDRESS/pre-backup/ /<br />
</source><br />
<br />
3a. If you have any "Out of Space" issues, try removing the ''--delete --del'' and replacing it with ''--delete-before''<br />
<br />
3b. It might also help to use a temporary directory for the copy with ''--temp-dir=/media/internal/tmp'', before settings this option, create the directory ''mkdir /media/internal/tmp''.<br />
<br />
4. Reboot immediately and pray it works.<br />
<source lang=bash><br />
reboot<br />
</source><br />
<br />
=Development/Improvement Ideas=<br />
*'''I need more people to test the restore process and get back to me with suggestions.'''<br />
*It would be awesome if the Palm Pre supported NFS, otherwise we're stuck to setting up '''/etc/rsyncd.conf''' on the Pre (for backup) and the Host (for restore).<br />
*A gui wrapper is possible because the Palm Pre comes shipped with rsync. Also, there needs to be an easy Windows server program to make this mainstream, only thing to use at the moment that's Windows based is cygwin. Otherwise we're stuck with Unix.<br />
*It's possible to create a cron job to run the backup every evening over WIFI (especially if you dock you're phone overnight). The cron job would be run from the Host computer. It's also recommended to set up iptables for allowing port 873 only for the host on the interface eth0 or usb0.<br />
* Would be nice to be able to have it run at a low priority and not kill any ssh connections. Have tried renicing the rsync daemons but has had no affect.<br />
<br />
=Contributor(s)=<br />
*hopspitfire<br />
*NetWhiz</div>Klktrk