Changes

Jump to navigation Jump to search
917 bytes removed ,  19:59, 26 October 2014
Further rework to move instructions towards Affa 3.
Line 846: Line 846:  
Please note, that the rise process backs up the the Affa server itself before doing the restore from the archive. This backup is used by a possible undorise run to restore the Affa server. Only the standard files and directories are backed up. Data in non-standard loctions (like /opt) are untouched and will still exist after the rise run.
 
Please note, that the rise process backs up the the Affa server itself before doing the restore from the archive. This backup is used by a possible undorise run to restore the Affa server. Only the standard files and directories are backed up. Data in non-standard loctions (like /opt) are untouched and will still exist after the rise run.
   −
{{Note box|By default This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
+
{{Note box|This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
    
  '''affa --undo-rise'''
 
  '''affa --undo-rise'''
 
This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs will work again.
 
This feature reverts a risen Affa box to a backup server. After a reboot, all configured jobs will work again.
   −
{{Note box|By default This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
+
{{Note box|This command is not implemented in Affa 3 for CentOS. It has been specifically added to the fork for SME.}}
    
=== Example setups ===
 
=== Example setups ===
 
==== Dedicated backup server  ====
 
==== Dedicated backup server  ====
* Set up a job for every server you want to backup
+
* Setup a dedicated server and install Affa 3 for SME.
* Send the public keys to every server
+
* Setup a job for every server you want to backup.
 +
* Send the public keys to every server.
 
  affa --send-key JOBNAME
 
  affa --send-key JOBNAME
* Check whether password-less logins are working
+
* Check whether password-less logins are working.
 
  affa --check-connections
 
  affa --check-connections
* Check whether the scheduled jobs are evenly distributed over the day
+
* Check whether the scheduled jobs are evenly distributed over the day.
 
  affa --show-schedule
 
  affa --show-schedule
* Create the cron jobs
+
* Create the cron jobs.
 
  affa --make-cronjobs
 
  affa --make-cronjobs
* Check the status after 24 hours
+
* Check the status after 24 hours.
 
  affa --status
 
  affa --status
      
==== Backup of single ibays  ====
 
==== Backup of single ibays  ====
 
Suppose you want to backup the ibays 'staff1' and 'staff2' on your production server with WAN IP 82.123.1.1  to an Affa server in a different location over the internet every night at 2:30am.
 
Suppose you want to backup the ibays 'staff1' and 'staff2' on your production server with WAN IP 82.123.1.1  to an Affa server in a different location over the internet every night at 2:30am.
* log into the Affa server and install the packages as described above.
+
* Log into the Affa server.
* copy the config helper script sample
+
* Create a dedicated job file ''/etc/affa/ibay-staff.conf'' . Edit it and set
cp /usr/lib/affa/jobconfig-sample.pl /root/ibay-staff-job.pl
+
[ibay-staff]
* edit /root/ibay-staff-job.pl and set
+
  Description=Backup of ibay-staff on 82.123.1.1
  my $jobname='ibay-staff';
+
  remoteHostName=82.123.1.1
and
+
  TimeSchedule=0230
  'remoteHostName‘=>'82.123.1.1',
+
  SMEServer=no
  'TimeSchedule'=>'0230',
+
  Include[0]=/home/e-smith/files/ibays/staff1
  'SMEServer'=>'no',
+
  Include[1]=/home/e-smith/files/ibays/staff2
  'Include[0]'=>'/home/e-smith/files/ibays/staff1',
+
* Save the configuration
  'Include[1]'=>'/home/e-smith/files/ibays/staff2',
  −
* write the configuration
  −
/root/ibay-staff-job.pl
   
* send the public key to the production server
 
* send the public key to the production server
 
  affa --send-key ibay-staff
 
  affa --send-key ibay-staff
Line 891: Line 888:     
==== Two production servers backup each other ====
 
==== Two production servers backup each other ====
You have two sites connnected via a VPN and a SME Server running on each site. In that case you don't need a dedicated Affa backup server. Both production servers can additionally act as Affa backup servers backing up the server of the other site. Simply install Affa and configure a job that backs up the other one. You can use all Affa features except of the rise feature.  
+
You have two sites connnected via a VPN and a SME Server running on each site. In that case you don't need a dedicated Affa backup server. Both production servers can additionally act as Affa backup servers backing up the server of the other site. Simply install Affa and configure a job that backs up the other one. You can use all Affa features except of the rise feature.
When using the rise feature the server become any of the backed up systems, which is less useful in this scenario as it would give you a running copy of the server of the other site while the server of this site is down.
+
 
 +
When using the rise feature, the server becomes any of the backed up systems, which is less useful in this scenario as it would give you a running copy of the server of the other site while the server of this site is down.
    
To get redundancy and a faster restore you can configure a local backup to an external USB or NAS device.
 
To get redundancy and a faster restore you can configure a local backup to an external USB or NAS device.
Line 899: Line 897:     
==== 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 ====
 +
 +
{{Note box|This chapter still needs to be checked whether it works with Affa 3.}}
    
You want to backup your SME production server with hostname 'prodbox‘ and IP 10.200.48.1 on a mounted filesystem instead of setting up a dedicated Affa box.
 
You want to backup your SME production server with hostname 'prodbox‘ and IP 10.200.48.1 on a mounted filesystem instead of setting up a dedicated Affa box.
Line 1,032: Line 1,032:     
==== Full restore ====
 
==== Full restore ====
To run a full restore of user and configuration data run on the Affa server
+
To run a full restore of user and configuration data, run on the Affa server
 
  affa --full-restore <JOB> [<ARCHIVE>]
 
  affa --full-restore <JOB> [<ARCHIVE>]
 
This rsyncs the data from the backup ARCHIVE back to the 'remoteHostname' defined in the configuration of the job JOB.  
 
This rsyncs the data from the backup ARCHIVE back to the 'remoteHostname' defined in the configuration of the job JOB.  
Line 1,045: Line 1,045:  
{{Warning box| A full restore reconstructs the server as it was at the time of the backup. That means, that all files created or server configuration changes made after the backup will be lost. After the restore is done, the restored server reboots automatically. }}
 
{{Warning box| A full restore reconstructs the server as it was at the time of the backup. That means, that all files created or server configuration changes made after the backup will be lost. After the restore is done, the restored server reboots automatically. }}
   −
==== Moving a SME 7 server installation to new hardware using the Affa rise feature ====
+
==== Moving a SME server installation to new hardware using the Affa rise feature ====
 
Please see this Howto: [[Moving SME to new Hardware]]
 
Please see this Howto: [[Moving SME to new Hardware]]
   Line 1,064: Line 1,064:  
With SMEServer=no nothing at all.
 
With SMEServer=no nothing at all.
   −
With SMEServer=yes the SME default backup list. The following command displays the list:
+
With SMEServer=yes the SME default backup list.  
perl -e 'use esmith::Backup;$b=new esmith::Backup;print join("\n",$b->restore_list)."\n"'
  −
 
  −
 
  −
'''Can I exclusively backup image files from a specific directory?'''
     −
Yes. Assuming you want to backup all gif and jpg files from directory /home/e-smith/files/ibays/pictures/files use this configuration
  −
db affa setprop JOBNAME SMEServer no          # do not include SME Server default directories and files
  −
db affa setprop JOBNAME Include[0] '/home/e-smith/files/ibays/pictures/files' # start searching here
  −
db affa setprop JOBNAME Include[1] '*/'        # search the tree recursively
  −
db affa setprop JOBNAME Include[2] '*.gif'    # copy files that match these patterns
  −
db affa setprop JOBNAME Include[3] '*.jpg' 
  −
db affa setprop JOBNAME Exclude[0] '*'        # exclude all others
  −
db affa setprop JOBNAME rsyncOptions '-m'      # do not create empty folders
        Line 1,095: Line 1,083:  
Verify that all jobs have been deleted
 
Verify that all jobs have been deleted
 
  affa --status
 
  affa --status
Remvove the Affa package
+
Remove the Affa package
 
  rpm -e smeserver-affa
 
  rpm -e smeserver-affa
 
and, if these packages are not needed by any other packages:
 
and, if these packages are not needed by any other packages:
28

edits

Navigation menu