Talk:Backing Up via Rsync

From WebOS Internals
Revision as of 23:54, 26 August 2009 by NetWhiz (talk | contribs)
Jump to navigation Jump to search

Rsync Daemon

Why turn on the rsync daemon at all? This could easily be accomplished simply by running

rsync -HrlptgoDPvvS --force --delete --del --stats -e ssh root@IPADDRESS:/ /media/pre-backup/

Also, since -P includes --progress, there's no reason to call it a second time.

-JackieRipper


We don't have a root password set up on the Pre, it's using sudo therefore that's why ssh won't work. Rsyncd.conf gives the rsync daemon root privileges so it can mirror the device. I'm be open to suggestions, but I'm trying to make this fit in with the next steps guide and limit the number of steps.

Thanks for pointing out the redundancy on --progress.

-hopspitfire


Ahhh yes. I keep forgetting that not everyone set up keys for root access.

-JackieRipper

Pre Rebooting Issue

If you don't exclude some of the directories then the Pre reboots when the backup process touches them. -hmagoo

Can you specify which files/directories prompt the reboot? -hopspitfire 02:57, 20 August 2009 (UTC)
I could narrow it down to proc and/or sys, that's narrow enough for me to exclude both, any progress on restore testing? I'm not running an emulator. -hmagoo
I tested the restore process and it works. Can you run the backup process and send the output to a file (rsync ... > /media/internal/rsync.log) and post it? -hopspitfire 00:49, 24 August 2009 (UTC)
rsync-outputs.tar.gz this was the console and log output from running a backup. I had already a backup in place in the destination but excluded /dev, /sys/ and /proc initially, ran it this time without those exclusions to test it out (again, as I saw this reboot the very first time I tried this method). rebooted right after this line in the console, similar in the log.
rsync: read errors mapping "/sys/devices/platform/lcd-controller/ctrl_reg_dump" (in root): No data available (61)

-hmagoo

I ran the backup again excluding /sys and everything completed, only errors I got in the console were:
rsync: send_files failed to open "/proc/sys/kernel/sched_nr_migrate" (in root): Permission denied (13)
rsync: send_files failed to open "/proc/sys/net/ipv4/route/flush" (in root): Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1524) [generator=3.0.5]

-hmagoo

Thanks for attaching your log. /sys and /proc don't need to be included in the backup, but /dev does (to initialize devices on boot). After testing the backup and restore, the easiest way is just mkdir the /sys and /proc directories and exlude them in the backup. Does the pre still restart when you excluded those directories?? -hopspitfire 21:23, 26 August 2009 (UTC)

Shouldn't /dev exist fine after a restore and before rsync backup restore? I guess if you made some strange volume changes, but still. --NetWhiz 21:59, 26 August 2009 (UTC)

I was using /dev as an example of a directory that _shouldn't_ be excluded in the backup process, so /dev will exist after a backup prior to a restore (otherwise the Pre won't boot because it can't initialize the mapper devices for storage). -hopspitfire 22:37, 26 August 2009 (UTC)

You mean it SHOULD be excluded b/c you will not need to restore it. --NetWhiz 22:54, 26 August 2009 (UTC)