Changes

Jump to navigation Jump to search
2,389 bytes added ,  02:44, 3 October 2010
added section Cloning a server for Test purposes, using inclusion & exclusion files
Line 139: Line 139:  
  signal-event post-upgrade
 
  signal-event post-upgrade
 
  reboot
 
  reboot
 +
 +
 +
====Cloning a server for Test purposes, using inclusion & exclusion files====
 +
 +
This alternative method can be used to clone a server for test purposes, and utilises inclusion & exclusion text files to specify what the backup tgz file will contain. Refer forum post http://forums.contribs.org/index.php/topic,46546.msg228428.html#msg228428
 +
 +
Warning: This procedure is meant to be used for testing purposes ONLY, where you wish to trial changes etc before implementing them on a "near to identically configured" production server.
 +
 +
=====Procedure to create the backup on the server to be cloned=====
 +
 +
Create a file named include.txt in /root/ with this content:
 +
touch /root/include.txt
 +
pico -w /root/include.txt
 +
Edit the file to contain the following (which is a deviation from the standard backup inclusion set of files & folders)
 +
home/e-smith/
 +
etc/e-smith/
 +
etc/group
 +
etc/gshadow
 +
etc/passwd
 +
etc/samba/secrets.tdb
 +
etc/samba/smbpasswd
 +
etc/shadow
 +
etc/smbpasswd
 +
etc/ssh
 +
etc/sudoers
 +
Save & exit
 +
Ctrl o
 +
Ctrl x
 +
 +
Create a file named /root/exclude.txt with this content:
 +
touch /root/exclude.txt
 +
pico -w /root/exclude.txt
 +
Edit the file to contain the following (which is the list of files & folders you wish to exclude from the backup)
 +
home/e-smith/files/ibays/*/files/*
 +
home/e-smith/files/users/*/home/*
 +
Save & exit
 +
Ctrl o
 +
Ctrl x
 +
 +
Run the pre-backup event (to dump the mysql tables to a file in /home/e-smith/db/mysql/)
 +
signal-event pre-backup
 +
 +
Run the tar command to create the smeserver.tgz backup file (the --totals directive is not strictly necessary, it is to provide information only)
 +
tar -cz --totals -vvp  --directory / --exclude-from=./exclude.txt --files-from=./include.txt  -f /tmp/smeserver.tgz
 +
 +
=====Procedure to restore the backup on the cloned server=====
 +
 +
Copy the smeserver.tgz file to the cloned server via ssh or via usb disk and follow the steps in this section of the Backup server config wiki article http://wiki.contribs.org/Backup_server_config#Command_line_manual_Restore_from_USB_drive_or_memory_stick
 +
 +
Ensure you prepare the new server for the restore, by issuing the following command
 +
signal-event pre-restore
 +
and then follow the steps referred to above.
 +
 +
 +
Performing the Procedures indicated above, will create a "near to identical" clone of the original server without user data and files in ibays. It will still contain user mail messages.
    
==Standard backup & restore inclusions==
 
==Standard backup & restore inclusions==
624

edits

Navigation menu