Changes

Jump to navigation Jump to search
1,806 bytes removed ,  20:04, 26 October 2014
Further rework to move instructions towards Affa 3.
Line 1,066: Line 1,066:  
With SMEServer=yes the SME default backup list.  
 
With SMEServer=yes the SME default backup list.  
    +
 +
{{Note box|The following example needs to be reworked for Affa 3.}}
 +
'''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,081: Line 1,092:  
  affa --revoke-key JOBNAME
 
  affa --revoke-key JOBNAME
 
  affa --delete-job JOBNAME
 
  affa --delete-job JOBNAME
Verify that all jobs have been deleted
+
Verify that all jobs have been deleted:
 
  affa --status
 
  affa --status
Remove the Affa package
+
Remove the Affa package:
  rpm -e smeserver-affa
+
  yum remove smeserver-affa-3.2.2.1-0.noarch.rpm
and, if these packages are not needed by any other packages:
+
Cleaning up:
rpm -e perl-Filesys-DiskFree perl-Compress-Bzip2
+
  rm -f /etc/cron.d/affa
Cleaning up
+
  rm -rf /etc/affa
  rm -f /etc/cron.d/affa /etc/cron.d/affa-status
  −
  rm -rf /home/e-smith/db/affa /home/e-smith/db/affa-report /home/e-smith/db/affa-rpmlist
   
  rm -rf /var/affa /var/log/affa
 
  rm -rf /var/affa /var/log/affa
   Line 1,104: Line 1,113:  
* You need remove the existing key so that the next ssh connection re-gets the keys from prodserver.  
 
* You need remove the existing key so that the next ssh connection re-gets the keys from prodserver.  
 
* From the command line edit the /root/.ssh/known_hosts file and remove the line for prodserver. It starts with: ''prodserver ip'' ssh-rsa
 
* From the command line edit the /root/.ssh/known_hosts file and remove the line for prodserver. It starts with: ''prodserver ip'' ssh-rsa
  −
==== Unable to send mail after a rise. ====
  −
'''Description:'''
  −
* fail to send mail after rise on the backup server when backuping fron SME 7 to SME8
  −
* qpsmtpd log shows :
  −
@400000005125f42409a8cd1c 4280 vvirus::clamav plugin (data_post): clamscan results: /var/spool/qpsmtpd/1361441818:4280:0: Access denied. ERROR
  −
@400000005125f42409aa9624 4280 virus::clamav plugin (data_post): ClamAV error: /usr/bin/clamdscan --stdout  --config-file=/etc/clamd.conf --no-summary /var/spool/qpsmtpd/1361441818:4280:0 2>&1: 2
  −
* /var/spool permissions problem
  −
#on the working server:
  −
ls -al /var/spool
  −
drwxr-s---  2 qpsmtpd clamav 4096 Jun 10 12:31 qpsmtpd
  −
  −
#On the broken (restored) server:
  −
ls -al /var/spool
  −
drwxr-x---  2 qpsmtpd clamav 4096 Jun 10 10:46 qpsmtpd
  −
  −
#On the fresh install before the restore:
  −
ls -al /var/spool
  −
drwxr-s---  2 qpsmtpd clamav 4096 Apr 17 13:47 qpsmtpd
  −
see [http://bugs.contribs.org/show_bug.cgi?id=4399| SME bug #4399]
  −
  −
  −
'''Solution:'''
  −
from command line on the backup server after Rise :
  −
chmod g+s /var/spool/qpsmtpd
  −
  −
==== Users can not login to server - Important ====
  −
Full restore oer raise via affa on SME8, all seems ok but users can't login to server (samba, horde . . . ecc.). User accounts seems to be there in server manager. see [[bugzilla:6983]] and [[bugzilla:7687]]<br />
  −
{{WIP box|msg=you have to read the bug content as it seems there is some other problems with this workaround}}
  −
This is due to un incomplete restore/raise of files contained in /etc folder, particularly of files containing users and password.
  −
First things first, if you complete an "affa --full-restore prodserv" do not delete your existing affa backup. If you complete an "affa --rise --all prodserv" do not continue to "/bin/rm -rf /var/affa" per the wiki (or delete your archive in any way).
  −
  −
*IF USED RISE FEATURE
  −
Login as "root" on your production server and apply these command lines
  −
  −
mkdir /etc/backup
  −
  −
cp -r /etc/{passwd,samba,e-smith,group,gshadow,shadow,ssh,sudoers} /etc/backup
  −
  −
yes | cp -r /var/affa/"JOBNAME"/"ARCHIVE"/etc/* /etc/
  −
  −
And finally reconfigure the server
  −
  −
signal-event post-upgrade; signal-event reboot
  −
  −
*IF USED FULL-RESTORE (Complete until step 1,2,3)
  −
  −
Login as "root" to your AFFA server and apply these command lines
  −
  −
export RDIR=/var/affa/"JOBNAME"/"ARCHIVE"/etc/
  −
  −
rsync -av $RDIR "PRODSERV-IP":/etc/
  −
  −
On your production server "PRODSERV" do by ssh in a root terminal:
  −
signal-event post-upgrade; signal-event reboot
      
=== Bug report ===
 
=== Bug report ===
28

edits

Navigation menu