Changes

Jump to navigation Jump to search
3,750 bytes added ,  16:26, 20 January 2008
Version 0.9.0
Line 53: Line 53:  
=== Download and Installation ===
 
=== Download and Installation ===
 
Download the '''''smeserver-affa''''' package from [http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/ one of the SME Server contrib mirrors] into an empty folder on your sme server
 
Download the '''''smeserver-affa''''' package from [http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/ one of the SME Server contrib mirrors] into an empty folder on your sme server
  wget <nowiki>http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/smeserver-affa-0.8.1-0.noarch.rpm</nowiki>
+
  wget <nowiki>http://mirror.contribs.org/smeserver/contribs/michaelw/sme7/affa/smeserver-affa-0.9.0-0.noarch.rpm</nowiki>
    
Configure the dag repositoy.{{Repository|dag}}
 
Configure the dag repositoy.{{Repository|dag}}
Line 199: Line 199:  
| rsync--modify-window
 
| rsync--modify-window
 
| integer >= 0 || 0 || When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value. This is normally 0 for an exact match. A value >= 0 is useful if you can't get the clocks of the source and the Affa server in sync.
 
| integer >= 0 || 0 || When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value. This is normally 0 for an exact match. A value >= 0 is useful if you can't get the clocks of the source and the Affa server in sync.
 +
|-
 +
| rsyncdMode
 +
| yes ''or'' no || no || set to yes to connect to the rsync daemon on the remote host (instead of running rsync over ssh)
 +
|-
 +
| rsyncdModule
 +
| string || AFFA || the rsyncd module name (only applicable with rsyncdMode=yes)
 +
|-
 +
| rsyncdUser
 +
| string || affa || the username for authentication to the rsync daemon (only applicable with rsyncdMode=yes)
 +
|-
 +
| rsyncdPassword
 +
| string || || the password for authentication to the rsync daemon (only applicable with rsyncdMode=yes)
 +
|-
 +
| remoteOS
 +
| cygwin || || with remoteOS=cygwin the options --send-key and --revoke-key uses the account 'Administrator' and the correct path for the public key on a Windows/Cygwin remote host. 
 
|}
 
|}
   Line 231: Line 246:     
  affa --send-key JOB
 
  affa --send-key JOB
 +
 +
affa --send-key --host=TARGETHOST [--port=PORT] [--remoteOS=cygwin]
 
This first generates the DSA key for the Affa Server, if not already done. Then it sends the public key to the host 'remoteHostName' as configured in the record of job JOB and generates the job specific ssh known host entry.  
 
This first generates the DSA key for the Affa Server, if not already done. Then it sends the public key to the host 'remoteHostName' as configured in the record of job JOB and generates the job specific ssh known host entry.  
 
{{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the production server.}}
 
{{Note box|When initially doing this step, you will need to temporarily enable "Allow secure shell access using standard passwords" on the production server.}}
{{Note box|The --send-key option only works on SME Server as a remote server and on systems where the keys are stored in /root/.ssh/authorized_keys2 and the commands /bin/cat, /bin/touch, /bin/grep and /bin/mv are available.}}
+
{{Note box|<nowiki>By default, the --send-key option works for a SME Server as a remote server and for systems where the keys are stored in /root/.ssh/authorized_keys2 and the commands /bin/cat, /bin/touch, /bin/grep and /bin/mv are available. With remoteOS=cygwin it works for a Cygwin/Windows remote server.</nowiki>}}
    
  affa --full-restore JOB [ARCHIVE]
 
  affa --full-restore JOB [ARCHIVE]
Line 317: Line 334:  
  affa --revoke-key JOB
 
  affa --revoke-key JOB
   −
  affa --revoke-key --host=TARGETHOST [--port=PORT]
+
  affa --revoke-key --host=TARGETHOST [--port=PORT] [--remoteOS=cygwin]
 
Deletes the public dsa key on the remote server.
 
Deletes the public dsa key on the remote server.
{{Note box|The --revoke-key option only works, if the public keys are stored in /root/.ssh/authorized_keys2 on the remote host. This is true for SME server.}}
+
{{Note box|<nowiki>By default, the --send-key option works for a SME Server as a remote server and for systems where the keys are stored in /root/.ssh/authorized_keys2. With remoteOS=cygwin it works for a Cygwin/Windows remote server.</nowiki>}}
    
  affa --check-connections
 
  affa --check-connections
Line 362: Line 379:  
==== [Todo] Two production servers backup each other ====
 
==== [Todo] Two production servers backup each other ====
 
...
 
...
 +
 +
 +
==== Backing up a Windows computer ====
 +
Backing up data from a Windows system requires the Cygwin Rsyncd daemon installed and configured on Windows. The standard procedure ''rsync over ssh'' does not work, as the Cygwin rsync process always hangs after some files were transferred.
 +
 +
===== Rsyncd setup on the Windows computer =====
 +
Install the Cygwin base, the rsync package and configure the Rsyncd service as described in this document: [[Rsyncd setup on a windows computer for use with Affa backup]]'.
 +
The installation of the sshd service is optional and not needed for the backup itself, but having a ssh login can be very helpful for administration or executing scripts on the Windows system. Affa supports sending the public key to a Windows Cygwin for password-less login.
 +
 +
===== Affa Rsyncd mode setup (Quick start example) =====
 +
You want to backup the ''My Documents'' folders of the users ''ssorglos'' and ''bsimpson'' from the Windows computer 'ws001' with IP 192.168.1.65 to your Affa server 'affabox' with IP 192.168.1.3.
 +
 +
1. log into the 'affabox' and copy the Cygwin config helper script sample
 +
cp /usr/lib/affa/jobconfig-cygwin-sample.pl /root/ws001-mydocs-job.pl
 +
2. edit /root/ws001-mydocs-job.pl and set
 +
my $jobname='ws001-mydocs';
 +
and
 +
'remoteHostName‘=>'192.168.1.65',
 +
'rsyncdPassword'=>'<i>secretword</i>',
 +
'Include[0]'=>'/c/Documents and Settings/ssorglos/My Documents/', ''don't use backslashes in pathnames!''
 +
'Include[1]'=>'/c/Documents and Settings/bsimpson/My Documents/',
 +
where ''secretword'' must be replaced by the password you have choosen in the rsyncd.secretsfile on the Windows box.
 +
 +
3. write the configuration (this makes the database entries and sets up the cronjobs)
 +
/root/ws001-mydocs-job.pl
 +
4. run the job manually. After completion check the archive /var/affa//var/log/ws001-mydocs and the logfile affa/ws001-mydocs.log
 +
affa --run ws001-mydocs
 +
 +
===== Affa Rsyncd mode manual setup =====
 +
In case you want to do the setup manually using the db command, these are the mandatory settings for Cygwin Rsyncd mode
 +
db affa setprop JOB rsyncdMode yes
 +
db affa setprop JOB rsyncdModule AFFA
 +
db affa setprop JOB rsyncdUser affa
 +
db affa setprop JOB rsyncdPassword ''secretword''
 +
db affa setprop JOB SMEServer no
 +
db affa setprop JOB RPMCheck no
 +
db affa setprop JOB Watchdog no
 +
Optional for ssh login
 +
db affa setprop JOB remoteOS cygwin
 +
    
==== Use Affa to backup to a NFS-mounted NAS or a local attached USB drive ====
 
==== Use Affa to backup to a NFS-mounted NAS or a local attached USB drive ====
Line 581: Line 638:  
==== Changelog ====
 
==== Changelog ====
 
<pre>
 
<pre>
 +
* Fri Jan 18 2008 Michael Weinberger
 +
  Version 0.9.0
 +
  Bugfix: run cronSetup() after job delete
 +
  Throw error if nothing was backed up (empty archive)
 +
  Added rsyncd support for backing up Windows/Cygwin
 +
  Added option and property remoteOS. Which remoteOS=cgywin the
 +
  send key and revoke key functions use the right path to the
 +
  authorized_keys2 file and login as user Administrator
 +
 +
 
* Sat Dec 29 2007 Michael Weinberger
 
* Sat Dec 29 2007 Michael Weinberger
 
   Version 0.8.1
 
   Version 0.8.1
Line 858: Line 925:  
==== Files ====
 
==== Files ====
 
<pre>
 
<pre>
/etc/e-smith/events/actions/affa-make-cronjobs
   
/etc/e-smith/events/actions/affa-make-cronjobs
 
/etc/e-smith/events/actions/affa-make-cronjobs
 
/etc/e-smith/events/post-upgrade/S90affa-make-cronjobs
 
/etc/e-smith/events/post-upgrade/S90affa-make-cronjobs
 +
/etc/e-smith/templates/etc/cron.d/affa-status/00run
 
/etc/e-smith/templates/etc/cron.d/affa/00jobs
 
/etc/e-smith/templates/etc/cron.d/affa/00jobs
/etc/e-smith/templates/etc/cron.d/affa-status/00run
   
/etc/logrotate.d/affa
 
/etc/logrotate.d/affa
 +
/etc/profile.d/affa.sh
 
/sbin/e-smith/affa
 
/sbin/e-smith/affa
 
/sbin/e-smith/affa-rpmlist.sh
 
/sbin/e-smith/affa-rpmlist.sh
 
/usr/lib/affa/COPYING
 
/usr/lib/affa/COPYING
 +
/usr/lib/affa/jobconfig-cygwin-sample.pl
 
/usr/lib/affa/jobconfig-sample.pl
 
/usr/lib/affa/jobconfig-sample.pl
 
/usr/lib/affa/postJobCommand-sample.pl
 
/usr/lib/affa/postJobCommand-sample.pl
501

edits

Navigation menu