2009-09-22

Using cwrsync for unofficial backups to my laptop.

I use rsync as my personal, speedy, non-enterprise backup solution.

I have valuable information scattered across several Unix environments. Frequently, I have to change this information. I back up my data to a Unix repository box using rsync. Because I am suitably paranoid, I also want a copy on my laptop as well.

My work laptop has a Windows OS. I use cwrsync on my laptop to pull the backup data from my Unix hosts. I create a directory for each Unix host that I want to back up and create a Windows batch file for each host. Below is an example batch file. It backs up /home/myid and /usr/src on the source box.

C:\Users\myid\Documents\system backups\somehost>more rsync_pull.bat
"c:\program files\cwrsync\bin\rsync.exe" -r -l -t --progress --exclude="src/BUILD" --exclude="src/logs" --rsh="c:\'program files'\cwrsync\bin\ssh.exe" somehost:/home/myid :/usr/src .

Here I am running the batch file. I have a new package file, as well as the two example files I made for this demonstration, plus other minor files.

C:\Users\myid\Documents\system backups\somehost>rsync_pull.bat
"c:\program files\cwrsync\bin\rsync.exe" -r -l -t --progress --exclude="src/BUILD" --exclude="src/logs" --rsh="c:\'program files'\cwrsync\bin\ssh.exe" somehost:/home/myid :/opt/isv/src .
somehost.ourdomain
myid@somehost.ourdomain's password:
receiving file list ...
77 files to consider
src/
src/RPMS/x86_64/
myid/.bash_history
       10312 100%    9.83MB/s    0:00:00 (xfer#1, to-check=75/77)
myid/.ssh/known_hosts
        1600 100%   78.12kB/s    0:00:00 (xfer#2, to-check=66/77)
src/RPMS/x86_64/httpd_mymodule-1.0-1.x86_64.rpm
        2962 100%   52.59kB/s    0:00:00 (xfer#3, to-check=27/77)
src/example.1
       10828 100%  139.13kB/s    0:00:00 (xfer#4, to-check=2/77)
src/test.2
         436 100%    4.30kB/s    0:00:00 (xfer#5, to-check=0/77)

sent 267 bytes  received 15605 bytes  2441.85 bytes/sec
total size is 24667445  speedup is 1554.15

Here is what the directory listing looks like. The final directory in the rsync source designation becomes the subdirectory name in the target parent directory.

C:\Users\myid\Documents\system backups\somehost>dir
 Volume in drive C has no label.
 Volume Serial Number is CCCC-7777

 Directory of C:\Users\myid\Documents\system backups\somehost

12/09/2009  03:02 PM    <DIR>          .
12/09/2009  03:02 PM    <DIR>          ..
02/13/2010  03:20 PM    <DIR>          myid
02/05/2010  12:02 PM               209 rsync_pull.bat
02/04/2010  05:23 PM    <DIR>          src
               1 File(s)            209 bytes
               4 Dir(s)  112,225,009,664 bytes free

2009-09-17

Identifier removed: apr_global_mutex_lock(rewrite_log_lock) failed

Regarding the mod_rewrite module in Apache httpd 2.2.11 (perhaps earlier) and these errors.


[Thu Sep 17 12:01:26 2009] [error] [client 10.0.0.1] (43)Identifier removed: apr_global_mutex_lock(rewrite_log_lock) failed
[Thu Sep 17 12:01:26 2009] [error] [client 10.0.0.1] (43)Identifier removed: apr_global_mutex_unlock(rewrite_log_lock) failed


These links are not high enough in the Google rankings. They should be #1 - #3 for this topic at this moment in time, and they are not.

https://issues.apache.org/bugzilla/show_bug.cgi?id=46942
http://marc.info/?l=apache-httpd-dev&m=124282193217344&w=2
https://bugzilla.redhat.com/show_bug.cgi?id=493023

Just doing my part to help in better search results.

2009-09-08

rsync-style backup for Windows.

My work laptop has Windows as its OS. Backing up files from local disk to removable media has been surprisingly difficult.

ntbackup.exe on XP tries to put all files into a single file on the removable media, and apparently it has a 4 GB file size limit. Useless. It actually asked me to change tapes!

All the rsync builds I've worked with are limited, flawed, or have Linux-like requirements that I simply do not care to attempt in Windows.

Someone at MS noticed this vacuum, and built something to fill it: SyncToy. It is just about perfect for such a utility on this platform. Now I can finally back my laptop to a USB drive.

UPDATE:

In Windows 7, the Backup and Restore Control Panel creates the backup as a series of zip files.

F:\mylaptop\Backup Set 2010-03-02 181457\Backup Files 2010-03-02 181457>dir
 Volume in drive F is BRUISER
 Volume Serial Number is 1A1A-1E1E

 Directory of F:\mylaptop\Backup Set 2010-03-02 181457\Backup Files 2010-03-02 181457

03/02/2010  06:18 PM    <dir>          .
03/02/2010  06:18 PM    <dir>          ..
03/02/2010  06:18 PM       184,773,087 Backup files 2.zip
03/02/2010  06:19 PM        55,641,178 Backup files 3.zip
03/02/2010  06:21 PM       137,063,197 Backup files 4.zip
               3 File(s)    377,477,462 bytes
               2 Dir(s)   8,098,111,488 bytes free

While this is nice for saving space, I cannot browse the files in Explorer. Browsing the files from within the Backup and Restore Control Panel is possible, but this is not as direct as opening an Explorer windoe.

I will continue to experiment with the Windows 7 built-in backup tool, but SyncToy has the simple straightforwardness that I am looking for.