ALT Linux Bugzilla
– View All Attachments for
Bug 5145
New bug
|
Search
|
[?]
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Attachment #645
http://www.harkness.co.uk/services/backup.html
text/html
2004-11-17 17:18:23 MSK
14.65 KB
no flags
Details
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>AMANDA - Backup in five days </title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Quanta Plus"> <meta name="AUTHOR" content="Xander D Harkness, Xander@Harkness.co.uk"> </head> <body bgcolor="white" text="#1c5722" link="#44a026" alink="#44a026" vlink="#5cc06e"> <!-- <body text="red" link="cyan" alink="blue" vlink="magenta"> --> <table cellpadding="2" cellspacing="2" border="0" style="text-align: left; width: 90%;" align="center"> <tbody> <tr> <td align="center" style="vertical-align: top;" <p align="right">Wed Nov 17 14:16:55 GMT 2004 </p> <p align="center"> | <a href="http://www.harkness.co.uk/">home</a> | <a href="../contact">contact</a> | <a href="../dvd_avi">dvd_avi</a> | <a href="../exim">exim</a> | <a href="../file_sharing">file_sharing</a> | <a href="../gallery">gallery</a> | <a href="../links">links</a> | <a href="../other">other</a> | <a href="../proxy">proxy</a> | <a href="../redhat">redhat</a> | <a href="../services">services</a> | <a href="../unix_web_gui">unix_web_gui</a> | <a href="../webcal">webcal</a> | <a href="../webmail">webmail</a> | </p> </td> </tr> </tbody> </table> <table> <tbody> <tr> <td> </td> <td> </td> </tr> <tr> <td width="130" valign="top"> <a href="backup.html">backup</a><br> <a href="dhcp_configuration.html">dhcp_configuration</a><br> <a href="xdmcp.html">xdmcp</a><br> </td> <td width="100%" align="center" valign="top"> <h2><div align="center">AMANDA backup in five steps</div></h2> <div align="justify">As with http caching software, there are many software applications you can use to backup Linux and other clients or peers. I give no comment to those products that their authors do not make easy to purchase or obtain. When preparing tenders or quotations it is unacceptable to have to haggle over hardware specifics for the purchase of a minor part of a task. Many have offered to make me a reseller; this is just nonsense, I have no interest in selling software and it is not honest, my role is to provide the best solution, not that which I receive most money.<br><br> I started using Arkeia for my last client as I wanted to provide a GUI to make backups and restores easier. This was in fact too complex, I replaced it with Amanda and it has been nothing but rosy. One department gets a daily email advising what has been backed up and which tape to put in next, the other department receives only two emails a week and has less onerous backup requirements. Restores are infrequent; however it was easier to provide complete documentation on the FTP-like interface to AMANDA. <br><br> Those that I have looked at, and this only equates to my personal opinions on these items:<br> <ul> <li><a href="http://www.amanda.org/">Amanda</a> - <br> A beautiful piece of software. It seems improvements come fast and thick, in addition it is possible to make your own additions and improvements as Amanda is open source software. It is tricky to set up; however once done, it requires minimal management. Amanda provides very useful output at all times for both management of backups and debugging during setup.</li> <li><a href="http://www.bacula.org/">Bacula</a> - <br> I have not had a good look at this software; however on a brief overview looks quite powerful. <li><a href="http://www.tapeware.com/">Tapeware</a> - <br> I like the fact the Tapeware publish their prices. Many other software companies selling backup software need your shoe size and dietary requirements before they will give you a price for the software. The price for Tapeware is cheaper than many; however I found it totally unacceptable that Tapeware binds to the SCSI interface stopping anything else from operating on the SCSI chain. Hence this was rejected.</li> <li><a href="http://www.arkeia.com/">Arkeia</a> - <br> Great as they offer three licences free, so it is useful for small domestic networks.<br> Unfortunately, expensive and no clear pricing, poor to non-existent logging for trouble shooting and the latest GUI is a useless monster.</li> <li><a href="http://www.veritas.com">Netbackup</a> - <br> No clear pricing.</li> <li><a href="http://www.tolisgroup.com/buy3.html">Bru Pro</a> - <br> No clear pricing</li> <li><a href="http://www.bakbone.com/">Bakbone</a> - <br> No clear pricing.</li> <li><a href="http://www.atempo.com/">Time Navigator</a> - <br> No clear pricing</li> <li><a href="http://www.storix.com/">SBA</a> - <br> Pricing published, much cheaper than products such as Netbackup; however I have not tried this software, though it would have to be very special to move me away from AMANDA.</li></ul> <br> The set up of Amanda may be done over a couple of days, there is quite a time consuming process (time consuming for the tape drive, not the operator) that makes life a little easier. This was originally written as a "Five days to Amanda" guide. Often Sys Admins are busy and backups are left and neglected as other 'more important' items are done instead. The idea was to provide a 30 minute job everyday and have the backups working by the end of the week :-)<br><br> <hr width="150" align="center"> <strong>Day One:</strong><br> <br>run the command amtapetype -f /dev/nst0<br> This is done so that you may receive an analysis of the tape device and the tape types. This is relevant, for example a Compaq 12/24 Gb DAT drive using DDS3 tapes may only provide 10Gb of space for backups. If the AMANDA configuration is told that the tapes will hold 12Gb then you will consistently get failed backups owing to lack of space.<br><br> The output from amtapetype may well take many hours as it writes to the complete tape a couple of times.<br><br> The output will look something like this:<br> tapetype tape-dds3 {<br> comment "just produced by amtapetype program"<br> length 9922 mbytes<br> filemark 0 kbytes<br> speed 973 kps<br> }<br> <br> You need to edit the file /etc/amanda/DailySet1/amanda.conf about half-way down the file you will find many tape definitions and you should add the new one you have just created. Please note that the name of the tape should be unique within the file, I have called mine tape-dds3. do not put spaces in, keep it short and simple. You will see other tape names such as DAT and QIC-60. Also ensure you get both parentheses in too. Further up in the file you will see the definition within the configuration file: tapetype HP-DAT (or similar), this should be changed to tapetype yournewname. I have tapetype tape-dds3.<br><br> There are three amanda packages available from Red Hat, these are amanda, amanda-client and amanda-server. For the clients you will only need amanda and amanda client. For the server you will obviously need amanda-server too. There is an example configuration in /etc/amanda/DailySet1/, using this and modifying the files to make them work for the particular setup required is the easiest option.<br> <br> <hr width="150" align="center"> <strong>Day Two:</strong><br> <br>edit the file /etc/amanda/DailySet1/amanda.conf, the items you need to set in this file are as follows: <ol> <li>org - This is in the email subject to differentiate between different backups.</li> <li>mailto - This should be set to the administrator's email addresses. Multiple addresses may be entered separated by spaces.</li> <li>tapecycle - This is the number of tapes in circulation. It is much easier if the tapes are labelled before we start testing. If Amanda encounters an unlabelled tape, it will be rejected rather than attempt to overwrite it.</li> <li>tapedev /dev/null - this should be changed to tapedev /dev/nst0, this is the non-rewinding device for Linux. If you are using a different Unix, then this will be different.</li></ol><br><br> <hr width="150" align="center"> <strong>Day Three:</strong><br> <br>Label a tape:<br><br> The command should be run as amanda, so here we have the command, by the user root<br><br> su amanda -c "/usr/sbin/amlabel DailySet1 DailySet101"<br><br> This command may be broken down as follows:<br><br> su (super user / switch user) to amanda -c (run command as this user) amlabel a tape belonging to backup group DailySet1 and label it as DailySet101. Note that the amanda.conf file specifies what the tapes may be labelled as, by default this is DailySet100 to DailySet199. The default back up cycle is a month.<br><br> If there is an error you normally get a good error message to advise you how to fix it. You will probably get a warning message regarding inability to read .bashrc, this is not something to worry about. I would suggest getting one backup to work and then labelling all the tapes, this may take some time as each tape could take 30-45 seconds to label.<br><br> Now we set one partition to backup:<br><br> edit file /etc/amanda/DailySet1/disklist down at the bottom, comment out using # all of the backups that are there by default or for example.<br><br> Put in one backup that being the name of your machine:<br><br> localhost /etc comp-root-tar This will only backup the /etc partition, which is normally quite small and makes a good test.<br><br> final task for Day three is to test and then run a backup:<br><br> run the command:<br><br> su amanda -c "/usr/sbin/amcheck DailySet1"<br><br> This should give us some diagnostic data and tell us whether there are any problems. If this is the first time the backup has been run, it will normally complain about missing index files. These are created during the backup.<br><br> Try running the backup and it will continue until finished at which point it will send the admins an email to tell you all is done and provide a report:<br><br> su amanda -c "/usr/sbin/amdump DailySet1"<br><br> <hr width="150" align="center"> <strong>Day Four:</strong><br><br> Once we have operational backups, we can then automate them:<br><br> As root run the following command:<br><br> crontab -e<br> <br>This will normally open the vi editor to edit your cron schedule.<br><br> press i to insert and type the following:<br> <br> # backup daily<br> 5 2 * * 1,2,3,4,5 su amanda -c "/usr/sbin/amdump DailySet1"<br> 0 16 * * 1,2,3,4,5 su amanda -c "/usr/sbin/amcheck DailySet1"<br> <br><br> These will run backups at 2:05am every weekday (late Sunday night - Monday morning) and at 4pm run a diagnostic to ensure that you have put the correct tape in and that all backup hosts are available.<br> <hr width="150" align="center"><br> <strong>Day Five:</strong><br><br> The last jobs are to add disks / machines to the backup, this will probably carry on over time as the system is tweaked and machines are added to the network.<br><br> The Amanda client is only available to Unix systems at present; however other systems may be backed up using file shares and the samba libraries.<br> <br><u>Unix systems</u>:<br> <br> For every machine that you add to the disklist / backup you have to tell the client machine that it authorises the backup server to access it. This is done by putting the backup server name in the following file:<br> <br> /var/lib/amanda/.amandahosts<br> <br> Just put the server name on a line on its own. Please note that the authorisation will fail if it fails to resolve this IP using DNS. To get round this you can enter the name and IP address in the /etc/hosts file.<br> <br> you can then add more machines to the disk list as follows:<br> <br> client1.domain.co.uk /etc comp-root-tar<br> client1.domain.co.uk /home comp-root-tar<br> client2.domain.co.uk hda1 comp-root-tar<br> <br> note that you can either use hardware names or the partitions:<br> <br> The hard drive names may be found using the command mount with no arguments. Please also note that amanda cannot backup a disk or partition larger than one disk at present. This may change in the future. Amanda works very well spreading full backups across the backup cycle, so that full backups are done as frequently as possible and does not leave a huge backup rush at the month end.<br><br> <br><u>Windows systems</u>:<br> <br> To backup windows systems you may wish to ensure that you have the latest version of Amanda available, these instructions assume you are using at least 2.4.3.<br><br> These systems are also entered into the disklist file as follows:<br> sambaserver.domain.com //windowsclient/share comp-root-tar<br> <br> Windows clients also need to use another file containing the passwords for the shares:<br> The share containing the passwords is /etc/amandapass and has the following format:<br> //windowsmachine/share user%pass<br> This file must be readable only by user amanda and group disk. This can be adjusted using the following commands:<br> chown amanda.disk /etc/amandapass<br> chmod o-rwx /etc/amandapass<br> <br> Please note that the samba server can be the backup server or another system; however this must be enabled as a client.<br> </div> </td> </tr> <tr> <td > </td> <td> </td> </tr> </tbody> </table> <hr> <p align="center">| <a href="http://www.harkness.co.uk/">home</a> | </p> <hr> <br> <!-- <hr align="center"><div align="center">| <a href="index.html" name="Home">Home</a> | <a href="mail.html" name="Mail Configuration" >Mail</a> | <a href="mail_filtering.html" name="Mail Filtering" type="text/html">Mail Filtering</a> | <a href="web_caching.html" name="Web Caching">Web Caching</a> | <a href="web_filtering.html" name="Web Filtering">Web Filtering</a> | <a href="ipcop.html" name="Internet Routing">Internet routing / Firewall</a> <br> <a href="samba4windomains.html" name="Samba emulating Windows Domains">Windows Domain Logins</a> | <a href="fileserver.html" name="File serving using Samba and NFS">File Server</a> | <a href="network_logins.html" name="Distributed Authorisation">Distributed Logins</a> | <a href="backup.html" name="Amanda Backups">Backup</a> | </div><hr align="center"><br> --> <div> <a href="http://validator.w3.org/check/referer"><img border="0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" height="31" width="88"></a> <a target="_blank" href="http://creativecommons.org/licenses/by-sa/1.0"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights"></a><br> This website is licensed under a <a target="_blank" href="http://creativecommons.org/licenses/by-sa/1.0">Creative Commons License</a>. </div> </html>