IT Administration/STRM/SectionOne/The PERC Backup Procedure v0 1

The PERC Backup Procedure

Map

Authour: Tony Seles

Date:   September 27, 2004

''The expressions written on this page can use some editing, simplification, and revision sometime. /T.''

''This is a files backup routine for the PERC. It should be improved. It is simple enough once these two steps are learned and practiced by somebody. Files from previous backups should be retrievable from PERC's backup CD-ROMs (and a superior set of instructions are planned to follow below in the future). This entrire process requires all PERC files to be stored on the Emma machine for each backup being performed. These instructions presume that all the pre-requisites of to this procedure are usable, and careful checking should be done in order to complete this procedure responsibly. The result of this procedure must be several CD's for the period for the PERC's backup, deposited by an administrator for the backups. This whole procedure took Tony approx. ninety-nine minutes when he first did this on September 27, 2004. Backing up only newer or changed files from the PERC can be the chore of whoever uses the "Tar" command because there are several options to select what appears in the latest backup CD set. (See options [ here | http://unixhelp.ed.ac.uk/CGI/man-cgi?tar ] -- TLDP.org) This result changes according to what is requested in each backup. This first backup is the largest if there is no additional information to backup in the future. The "Tar" command can also be used to unpack any of all of the files in any of any set produced by this procedure, knowing how to use all of these simple tools. Users of "root" accounts should take care not to damage any PERC systems, though. The locations of the deposit for backups were noted below at publication. Statistics: "size1=404MB (single CD)." __Please remember to carefully free up the space when not in use on Emma afterwards.__ We should remember to verify the work we do each time before we finish the backup step and before any restore step is required.''

''Backups from every period can be deposited in a location designated by Committees at the PERC, and are transported using instructions not described here. (eg. "Rsync", etc.).''

!1. Use a UNIX command-line to visit the directories of interest to the backup. They can all be compressed using the "tar" compression, and made accessible to the Windows LAN from the Fernando machine afterwards (by moving the compressed file into the "" directory on the Emma machine and changing the ownership of the compressed file to the "smbuser" user.). This procedure is slower when not using a root account because machines would have to do more work (i.e. all this across a network instead of directly).

The tar command used from the "root@emma" machine account in the "/data" directory:

`tar -cvv --newer "Tue Oct 19 12:12:12 2004" /home/samba/data /data/data > perc_backup.tar && bzip2 perc_backup.tar`

''for example... or initially...''

`tar -cvv /home/samba/data /data/data > backup_perc.tar && bzip2 backup_perc.tar`

(There exists an accessable manual for the "Tar" utility.)

__(N.B. for this next step... The "Nero Express" filename suffix input restriction that is accepted can be ".ISO"... rename it accordingly even though the format afterwards is really just ".tar.bz2".)__

''20041006keb some notes: - it should not be necessary to login as root for a samba content backup. perhaps we can create a samba group and add the emma shell user accounts into it.

Oct 22 Tony replies:

There may be a way except I found it easier to access "/data" directory, using a simpler Tar command, this way.

- the .ISO filename is usually only used for making CD images. it should be possible to save the full filename backup_perc.tar.bz2 onto the CD if it is created as a Data CD. i would suggest putting the backup date into the filename as well, e.g. backup_perc-20041004.tar.bz2 - correction: tar is not a compressor, the --bzip option (among others) adds compression to its archiving operations.''

!2. Add all the ".TAR" files from above to a CD-ROM gathered from the PERC on the Fernando machine, and complete the backup using the "Nero Express" installation there.

(If the compressed file ever is larger than one CD-ROM then the UNIX "Split" command can be integrated into this procedure if appropriate and the backup will overflow into a Series of CD-ROMs for that particular period for the PERC... multiple CD-ROMs, and this is acceptable. Split generates a series of files that have a common prefix, eg. 1_aa, 1_ab, etc... to put them back together just use Cat any you will get a "tar.bz2" file upon which you can use Tar.)

__The "trick" with Nero is to burn "Data CDs" from the Desktop and Not over the LAN: this method has always worked for Tony (before Oct. 22, 2004).__

''20041006keb more notes: - i am not sure that the CD Writing hardware on Fernando is reliable, especially with newer high speed media. we could run some tests before trusting our backups to it. - if backups are to be done often from Emma, we might improve things by installing the hardware there instead, assuming the computer remains in an accessible location. - perhaps we can look into multi-volume archives and setting the "tape length" parameter to 650MB or so to prevent splitting tar archives in an ungraceful manner.''

!3. Again, the result of this procedure must be several CD's for the period for the PERC's backup, deposited by an administrator for the backups.

__Locations of the deposit for backups are tentatively: in the "IT Administration Committee" drawer in the filecabinet initially, labelled. What will actually be produced by a backup in terms of files and CDs is: a CD set (stored on-site), and a hand-delivered file (Tony can make a CD copy of the backup and put them in a labeled envelope in the coordinator's mailbox) that is taken off-site "securely".__

This is being done successfully.

The procedure to retrieve a file would be to copy the complete contents of the relevant CDs into one folder - then move that folder to a UNIX-like file system, then "cat" the files together in the correct order, un-"tar" (uncompress and untar the file using a command like "tar xvfj file.tar.bz2"), and obtain the file.