<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu Linux, ubuntu desktop, Linux operating system, ubuntu guide &#187; Amanda</title>
	<atom:link href="http://ubuntulinux.co.in/blog/category/backup/amanda/feed/" rel="self" type="application/rss+xml" />
	<link>http://ubuntulinux.co.in/blog</link>
	<description>How to fix the Technical issue in Ubuntu linux</description>
	<lastBuildDate>Thu, 17 May 2012 13:12:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Amanda backup setup and configuration using Virtual Tape in Fedora</title>
		<link>http://ubuntulinux.co.in/blog/ubuntu/amanda/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amanda</link>
		<comments>http://ubuntulinux.co.in/blog/ubuntu/amanda/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 13:21:58 +0000</pubDate>
		<dc:creator>sahab</dc:creator>
				<category><![CDATA[Amanda]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Amanda backup setup and configuration using Virtual Tape in Fedora]]></category>
		<category><![CDATA[amanda.virtual tape]]></category>
		<category><![CDATA[ubuntu linux]]></category>

		<guid isPermaLink="false">http://ubuntulinux.co.in/blog/?p=489</guid>
		<description><![CDATA[This document describes the steps to be followed to amanda backup setup configuration using virtual tape.  As of date, the current stable version of Amanda is 3.3.0.]]></description>
			<content:encoded><![CDATA[<p>This document describes the steps to be followed to amanda backup setup configuration using virtual tape.  As of date, the current stable version of Amanda is 3.3.0.</p>
<p><strong>AMANDA</strong>, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that allows the administrator to set up a single master backup server to back up multiple hosts over network to tape drives/changers or disks or optical media. Amanda uses native dump and/or GNU tar facilities and can back up a large number of workstations running multiple versions of Unix.</p>
<p>This will guide you through setting up virtual tapes (utilize hard disk space for backups)</p>
<p>Here we are using Fedora 14 as Amanda server – <strong>backup.server.com</strong> (hostname)</p>
<p>and amanda client is an ubuntu desktop machine – <strong>backup.client.com</strong> (hostname)</p>
<p>  <a href="http://ubuntulinux.co.in/blog/wp-content/uploads/2012/03/amanda.jpg"><img class="aligncenter size-medium wp-image-490" title="amanda" src="http://ubuntulinux.co.in/blog/wp-content/uploads/2012/03/amanda-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>Fedora we have installed using minimal packages and not installed the default amanda software with send mail server. Download the amanda latest version 3.3.0 stable version</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Step 1</span></strong></p>
<p>Open the terminal</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"><strong>#wget -c http://prdownloads.sourceforge.net/amanda/amanda-3.3.0.tar.gz?download</strong></p>
<p><strong>#tar -xvzf amanda-3.3.0.tar.gz</strong></p>
<p><strong>#cd amanda-3.3.0</strong></p>
<p><strong>#./configure</strong></p>
<p><strong>#make</strong></p>
<p><strong>#make check</strong></p>
<p>We get error when we missed any packages and libraries.</p>
<p><strong>#make install</strong></td>
</tr>
</tbody>
</table>
<p><strong><span style="text-decoration: underline;"> </span></strong><strong><span style="text-decoration: underline;">Step 2</span></strong></p>
<p>The Amanda services are started by the extended internet daemon, <strong>xinetd</strong>, which is why you must have <strong>xinetd</strong> installed on every Amanda server and client. In any text editor, create one <strong>xinetd</strong> startup file, <strong>/etc/xinetd.d/amandaserver</strong></p>
<p>If you have not already installed xinetd, install it</p>
<p><strong># yum install xinetd</strong></p>
<p>Create an amanda xinetd entry</p>
<p><strong># vim etc/xinetd.d/amandaserver</strong></p>
<p>Give it the following contents</p>
<p>Code: </p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"><strong># default: on<br />
#<br />
# description: Amanda services for Amanda server and client.<br />
#<br />
service amanda<br />
{<br />
        disable          = no<br />
        socket_type  = stream<br />
        protocol        = tcp<br />
        wait               = no<br />
        user               = amandabackup<br />
        group            = disk<br />
        groups          = yes<br />
        server            = /usr/lib/amanda/amandad<br />
        server_args   = -auth=bsdtcp amdump amindexd amidxtaped<br />
}</strong></td>
</tr>
</tbody>
</table>
<p> Restart xinetd</p>
<p><strong># /etc/init.d/xinetd restart</strong></p>
<p>Become <strong>amandabackup </strong>user</p>
<p><strong># su amandabackup<br />
</strong>Create copies of the configuration files, just in case</p>
<p><strong>$cp -r /etc/amanda/DailySet1 /etc/amanda/DailySet1.bak</strong></p>
<p><strong><span style="text-decoration: underline;">Step 3</span></strong></p>
<p>Edit amanda.conf</p>
<p><strong>$ vim /etc/amanda/DailySet1/amanda.conf</strong></p>
<p>Make the following changes in the file</p>
<p>Code:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="624">Make the following changes in the file<br />
<strong>Code:<br />
      org &#8220;DailySet1&#8243;                                                 </strong># your organization name for reports<strong><br />
      mailto &#8220;backupadmin@yourdomain.com&#8221;   </strong># space separated list of operators at your site<br />
<strong>      dumpuser &#8220;amandabackup&#8221;<br />
      tpchanger &#8220;chg-disk&#8221;                                       </strong># the tape-changer glue script<strong><br />
      tapedev &#8220;</strong><strong>file:/amandabackup/DailySet1/slots&#8221;   </strong># the no-rewind tape device to be used<strong><br />
      tapetype HARDDISK<br />
  </strong></p>
<p><strong>define dumptype global {<br />
      comment &#8220;Global definitions&#8221;<br />
       auth &#8220;bsdtcp&#8221;<br />
}<br />
define dumptype gui-base {<br />
       global<br />
       program &#8220;GNUTAR&#8221;<br />
       comment &#8220;gui base dumptype dumped with tar&#8221;<br />
       compress none<br />
       index yes<br />
}<br />
define tapetype HARDDISK {<br />
length 100000 mbytes<br />
}</p>
<p>#Add the following lines to support the encrypted backup</p>
<p>define dumptype client-encrypt-ossl {<br />
        global<br />
        program &#8220;GNUTAR&#8221;<br />
        comment &#8220;no compression and client symmetric encryption with OpenSSL&#8221;<br />
        compress none<br />
        encrypt client<br />
        client_encrypt &#8220;/usr/sbin/amcrypt-ossl&#8221;<br />
        client_decrypt_option &#8220;-d&#8221;<br />
    }</strong></td>
</tr>
</tbody>
</table>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
<p> <strong><span style="text-decoration: underline;">Step 4</span></strong></p>
<p>Choose a location for your virtual tapes to reside. Here we using <strong>/amandabackups/</strong> Create the tapelist file that is necessary for indexing tapes available<br />
Code:</p>
<p><strong>#touch /etc/amanda/DailySet1/tapelist<br />
</strong><br />
create the location and set permissions for the virtual tapes<br />
Code:</p>
<p><strong>#mkdir -p -m 770 /amandabackup/DailySet1/slots</strong></p>
<p><strong>#chown -R backup:backup /amdndahosts</strong></p>
<p>CD to the new directory from amandabackup user</p>
<p><strong>$cd /amandabackup/DailySet1/slots</strong></p>
<p>Create the necessary directories for the tapes<br />
Code:</p>
<p><strong>$for ((i=1; $i&lt;=25; i++)); do mkdir slot$i; done<br />
</strong><br />
Create symlink for the data directory to point to the first tape<br />
Code:</p>
<p><strong>$ln -s slot1 data</strong></p>
<p>Label the tapes</p>
<p><strong>for ((i=1; $i&lt;=9; i++)); do amlabel DailySet1 DailySet?1$i slot $i; done</strong></p>
<p><strong>for ((i=10; $i&lt;=25; i++)); do amlabel DailySet1 DailySet1$i slot $i; done</strong></p>
<p> Output should look like (for each slot)<strong></strong></p>
<p><strong>labeling tape in slot 1 (file:/amandabackup/DailySet1/slots)<br />
rewinding, reading label, not an amanda tape<br />
rewinding, writing label DailySet?1-01, checking label, done.</strong></p>
<p>Reset the changer back to slot 1</p>
<p><strong>amtape DailySet1 reset</strong></p>
<p>Output should look like</p>
<p><strong>amtape: changer is reset, slot 1 is loaded.</strong></p>
<p>Create below directory for Amanda log files</p>
<p><strong>#mkdir -p /usr/adm/amanda<br />
#chown amandabackup:disk /usr/adm/amanda</strong></p>
<p><strong><span style="text-decoration: underline;">Step 6</span></strong></p>
<p>Edit .amandahosts “ backup.server.com” <strong>/var/lib/amanda/.amandahosts</strong> file to allow the backup clients to connect back to the server when doing restores. Specify fully qualified domain names</p>
<p>On the .amandahosts file is located as <strong>/var/lib/amanda/.amandahosts</strong></p>
<p>Open the file</p>
<p>vim <strong>/var/lib/amanda/.amandahosts</strong></p>
<p>The file looks like</p>
<p><strong>backup.server.com root amindexd amidxtaped</strong></p>
<p><strong>backup.server.com amandabackup amindexd amidxtaped</strong></p>
<p><strong>backup.client.com  root amindexd amidxtaped<br />
backup.server.com amandabackup admump</strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong><strong><span style="text-decoration: underline;">Step 6</span></strong></p>
<p>Create an <strong>/etc/amanda/DailySet1/disklist</strong> file in the Amanda configuration directory</p>
<p>The format for the disklist file is :</p>
<p>Dumptypes are deinfed in /etc/amanda/amanda.conf, but we using the GNUTAR dumptype comp-user-tar for this example</p>
<p><strong>vim</strong> <strong>/etc/amanda/DailySet1/disklist</strong></p>
<p>Add a line like so</p>
<p>Code:</p>
<p><strong>backup.client.com /var/www/html comp-user-tar</strong></p>
<p><strong>backup.client.com /home / encrypt-simple</strong></p>
<p><strong>backup.server.com /etc comp-user-tar</strong></p>
<p align="center"><strong><span style="text-decoration: underline;">Amanda Client Setup</span></strong></p>
<p>&nbsp;</p>
<p>Here We are using two clients one is <strong>backup.client.com </strong>and another one is the same amdanda server <strong>backup.server.com</strong></p>
<p>Install AMANDA client</p>
<p>Install the AMANDA client app</p>
<p><strong><span style="text-decoration: underline;">Step 1</span></strong></p>
<p><strong>$sudo apt-get install amanda-client</strong></p>
<p>Create necessary amanda directory ( It is not needed for the server ubuntulinux.co.in)</p>
<p><strong>$sudo mkdir -p -m 770 /etc/amanda</strong></p>
<p>Change owner</p>
<p> <strong>$sudo chown -R amandabackup:amandabackup /etc/amanda</strong></p>
<p><strong><span style="text-decoration: underline;">Step 2</span></strong></p>
<p>Become the amandabackup user</p>
<p><strong>$su amandabackup</strong></p>
<p>Create an excludes file</p>
<p><strong>touch /etc/amanda/exclude.gtar</strong></p>
<p>Edit <strong>/etc/amandahosts</strong> to allow server to connect to client machine for backups</p>
<p><strong>localhost amandabackup</strong></p>
<p><strong>backup.client.com amandabackup</strong></p>
<p><strong>backup.server.com amandabackup</strong></p>
<p><strong><span style="text-decoration: underline;"> </span></strong><strong><span style="text-decoration: underline;">Step  3</span></strong></p>
<p>Create xinetd amanda entry</p>
<p><strong>sudo vim /etc/xinetd.d/amanda</strong></p>
<p>Edit the file, mine looks like</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638"><strong># default: on</strong></p>
<p><strong># description: Amanda services for Amanda client.</strong></p>
<p><strong>#</strong></p>
<p><strong>service amanda</strong></p>
<p><strong>{</strong></p>
<p><strong>bind               = backup.client.com</strong></p>
<p><strong>socket_type   = dgram</strong></p>
<p><strong>protocol         = udp</strong></p>
<p><strong>wait                 = yes</strong></p>
<p><strong>user                 = amandabackup</strong></p>
<p><strong>group              = amandabackup</strong></p>
<p><strong>groups            = yes</strong></p>
<p><strong>server              = /usr/lib/amanda/amandad</strong></p>
<p><strong>server_args      = -auth=bsd amdump</strong></p>
<p><strong>disable          = no</strong></p>
<p><strong>}</strong></p>
<p>&nbsp;</td>
</tr>
</tbody>
</table>
<p>Restart xinetd</p>
<p><strong>$sudo /etc/init.d/xinetd restart</strong></p>
<p>Edit <strong>/etc/services </strong>to look like</p>
<p><strong># Amanda Services</strong></p>
<p><strong>amanda           10080/udp</strong></p>
<p><strong>amanda           10080/tcp</strong></p>
<p><strong>kamanda         10081/udp</strong></p>
<p><strong>kamanda         10081/tcp</strong></p>
<p><strong>amandaidx      10082/tcp</strong></p>
<p><strong>amidxtape       10083/tcp</strong></p>
<p>Make sure your <strong>/etc/inetd.conf</strong> looks like</p>
<p><strong>amanda dgram udp wait backup /usr/sbin/tcpd /usr/lib/amanda/amandad</strong></p>
<p> <strong><span style="text-decoration: underline;">Step 4</span></strong></p>
<p>Verify the Configuration, Run amcheck on Server to verify configuration files, connections, etc lgoin as amandabackup user</p>
<p>Code:</p>
<p><strong>$amcheck DailySet1</strong></p>
<p>Output looks like</p>
<p><strong>$amcheck DailySet1</strong><br />
Amanda Tape Server Host Check<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
found in slot 1: volume &#8216;DailySet1-01&#8242;<br />
slot 1: volume &#8216;DailySet1-01&#8242;<br />
Will write to volume &#8216;DailySet1-01&#8242; in slot 1.<br />
NOTE: skipping tape-writable test<br />
NOTE: conf info dir /usr/adm/amanda/curinfo does not exist<br />
NOTE: it will be created on the next run.<br />
NOTE: index dir /usr/adm/amanda/index does not exist<br />
NOTE: it will be created on the next run.<br />
Server check took 0.972 seconds</p>
<p>Amanda Backup Client Hosts Check<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Client check: 1 host checked in 7.147 seconds.  0 problems found.</p>
<p>(brought to you by Amanda 3.3.0)</p>
<p><strong><span style="text-decoration: underline;">Amanda backup</span></strong></p>
<p><strong>$ amdump DailySet1 </strong><strong>à</strong><strong> Dump the give server files and alert mail will send to backupadmin@yourdomain.com</strong></p>
<p><strong> </strong><strong>$ amtape DailySet1 show</strong><br />
amtape: scanning all 15 slots in changer:<br />
<strong>slot   1: date 20111002092634 label DailySet1-01</strong> à last backup date<br />
slot   2: date X              label DailySet1-02<br />
slot   3: date X              label DailySet1-03<br />
slot   4: date X              label DailySet1-04<br />
slot   5: date X              label DailySet1-05<br />
slot   6: date X              label DailySet1-06<br />
slot   7: date X              label DailySet1-07<br />
slot   8: date X              label DailySet1-08<br />
slot   9: date X              label DailySet1-09<br />
slot  10: date X              label DailySet1-010<br />
slot  11: date X              label DailySet1-011<br />
slot  12: date X              label DailySet1-012<br />
slot  13: date X              label DailySet1-013<br />
slot  14: date X              label DailySet1-014<br />
slot  15: date X              label DailySet1-015Amrecover</p>
<p> <strong><span style="text-decoration: underline;">amrecover – Recover the files from backup</span></strong></p>
<p>Amrecover browses the database of Amanda index files to determine which tapes contain files to recover. Furthermore, it is able to recover files.</p>
<p>In order to restore files in place, you must invoke amrecover from the root of the backed up filesystem, or use lcd to move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory. See the examples below for details.</p>
<p>Amrecover should be run as <strong>root</strong> user.</p>
<p>Amrecover will the read the amanda-client.conf file and the config/amanda-client.conf file. If no configuration name is supplied on the command line, Amrecover will try the compiled-in default configuration, usually DailySet 1.</p>
<p>Edit the following lines in <strong>amanda-client.conf</strong></p>
<p> <strong>conf  DailySet1</strong> # your config name</p>
<p><strong>index_server backup.server.com  # your amindexd server</strong></p>
<p><strong>tape_server backup.server.com # your amidxtaped server</strong></p>
<p><strong>tapedev file:/amandabackup/DailySet1/slots # your tape device</strong></p>
<p>Example</p>
<p><strong>amrecover&gt; listhost</strong></p>
<p>200- List hosts for config DailySet1</p>
<p>201- 10.132.100.56</p>
<p>200  List hosts for config DailySet1</p>
<p><strong>amrecover&gt; sethost 10.132.100.56</strong></p>
<p>200 Dump host set to 10.132.100.56.</p>
<p><strong>amrecover&gt; list disk</strong></p>
<p>Extract list written to file disk</p>
<p><strong>amrecover&gt; setdisk /home/user/Desktop/var /tmp</strong></p>
<p>200 Disk set to /home/user/Desktop/var.</p>
<p><strong>amrecover&gt; ls</strong></p>
<p>2011-09-21-19-18-44 test3</p>
<p>2011-09-21-19-18-44 test2</p>
<p>2011-09-21-19-18-44 test1</p>
<p>2011-09-21-19-18-44 .</p>
<p><strong>amrecover&gt; listdisk</strong></p>
<p>200- List of disk for host 10.132.100.56</p>
<p>201- /home/user/Desktop/var</p>
<p>&nbsp;</p>
<p>200 List of disk for host 10.132.100.56</p>
<p>amrecover&gt; lpwd</p>
<p>/root/old</p>
<p><strong>amrecover&gt; add test2</strong></p>
<p>Added file /test2</p>
<p><strong>amrecover&gt; extract</strong></p>
<p><strong>Extracting files using tape drive changer on host localhost.</strong></p>
<p><strong>The following tapes are needed: DailySet1-01</strong></p>
<p><strong>Extracting files using tape drive changer on host localhost.</strong></p>
<p><strong>Load tape DailySet1-01 now</strong></p>
<p><strong>Continue [?/Y/n/s/d]? y</strong></p>
<p><strong>Restoring files into directory /root/old</strong></p>
<p><strong>All existing files in /root/old can be deleted</strong></p>
<p><strong>Continue [?/Y/n]? y</strong></p>
<p>./<strong>test2</strong></p>
<p><strong>amrecover&gt; ls</strong></p>
<p><strong>2011-09-21-19-18-44 test3</strong></p>
<p><strong>2011-09-21-19-18-44 test2</strong></p>
<p><strong>2011-09-21-19-18-44 test1</strong></p>
<p><strong>2011-09-21-19-18-44 .</strong></p>
<p><strong>amrecover&gt; exit</strong></p>
<p><strong>200 Good bye.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntulinux.co.in/blog/ubuntu/amanda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amanda Backup Using Virtual Tape on Ubuntu</title>
		<link>http://ubuntulinux.co.in/blog/ubuntu/amandabackup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amandabackup</link>
		<comments>http://ubuntulinux.co.in/blog/ubuntu/amandabackup/#comments</comments>
		<pubDate>Fri, 28 May 2010 08:29:11 +0000</pubDate>
		<dc:creator>sahab</dc:creator>
				<category><![CDATA[Amanda]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu 10.04]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://ubuntulinux.co.in/blog/?p=113</guid>
		<description><![CDATA[Amanda Backup Using Virtual Tape on Ubuntu]]></description>
			<content:encoded><![CDATA[<div><span style="font-size: small;"><strong>Amanda Client</strong></p>
<p>Here We are using two clients one is backup.ubuntulinux.co.in and another one is the same amdanda server ubuntulinux.co.in.</p>
<p>Install AMANDA client</p>
<p>Install the AMANDA client app</p>
<p><strong> sudo apt-get install amanda-client</strong></p>
<p>Create necessary amanda directory ( It is not needed for the server ubuntulinux.co.in)</p>
<p><strong> sudo mkdir -p -m 770 /etc/amanda</strong></p>
<p>Change owner</p>
<p><strong>sudo chown -R backup.backup /etc/amanda</strong></p>
<p>Become the backup user</p>
<p><strong> su backup</strong></p>
<p>Create an excludes file</p>
<p><strong>touch /etc/amanda/exclude.gtar</strong></p>
<p>Edit /etc/amandahosts to allow server to connect to client machine for backups</p>
<p><strong> localhost backup<br />
backup.ubuntulinux.co.in backup<br />
ubuntulinux.co.in backup</strong></p>
<p>Create xinetd amanda entry</p>
<p><strong>sudo vim /etc/xinetd.d/amanda</strong></p>
<p>Edit the file, mine looks like</p>
<p># default: on<br />
#<br />
# description: Amanda services for Amanda client.<br />
#<br />
service amanda<br />
{<br />
bind               = backup.ubuntulinux.co.in<br />
socket_type  = dgram<br />
protocol         = udp<br />
wait                 = yes<br />
user                 = backup<br />
group              = backup<br />
groups            = yes<br />
server              = /usr/lib/amanda/amandad<br />
server_args      = -auth=bsd amdump<br />
disable          = no<br />
}</p>
<p>Each of these lines is very important. The &#8220;bind&#8221; line will probably not be necessary for most configurations &#8211; this is in place because I have 2 different IP addresses binding to the same device (eth0 aliases).</p>
<p>Restart xinetd</p>
<p><strong> sudo /etc/init.d/xinetd restart</strong></p>
<p>Edit /etc/services to look like</p>
<p>#<br />
# Amanda Services<br />
#<br />
amanda          10080/udp<br />
amanda          10080/tcp<br />
kamanda         10081/udp<br />
kamanda         10081/tcp<br />
amandaidx       10082/tcp<br />
amidxtape       10083/tcp</p>
<p>Make sure your /etc/inetd.conf looks like</p>
<p></span></div>
<div><span style="font-size: small;"><br />
amanda dgram udp wait backup /usr/sbin/tcpd /usr/lib/amanda/amandad</p>
<p>On the Server</p>
<p>Verify Configuration<br />
Run amcheck on Server to verify configuration files, connections, etc lgoin as backup user<br />
Code:</p>
<p><strong> amcheck DailySet1</strong><br />
Output looks like<br />
Cod</p>
<p><strong> backup@ubuntulinux:~$ amcheck DailySet1<br />
Amanda Tape Server Host Check<br />
Holding disk /dumps/amanda: 4478364 KB disk space available, using 4375964 KB<br />
slot 2: read label `DailySet1-02&#8242;, date `X&#8217;<br />
NOTE: skipping tape-writable test<br />
Tape DailySet?1-02 label ok<br />
Server check took 0.112 seconds<br />
Amanda Backup Client Hosts Check<br />
Client check: 2 host checked in 0.017 seconds, 0 problems found<br />
(brought to you by Amanda 2.5.1p3)</strong></p>
<p></span></div>
<div><span style="font-size: small;"> </span></div>
<div><span style="font-size: small;">For taking the backup</span></div>
<div><span style="font-size: small;"> </span></div>
<div><span style="font-size: small;"><strong>amdump Dailyset1</strong></span></div>
<div><span style="font-size: small;"> </span></div>
<div><span style="font-size: small;"><strong>Amrecover</strong></span></div>
<div><span style="font-size: small;"><br />
amrecover — Amanda index database browser</p>
<p>Amrecover browses the database of Amanda index files to determine which tapes contain files to recover. Furthermore, it is able to recover files.</p>
<p>In order to restore files in place, you must invoke amrecover from the root of the backed up filesystem, or use lcd to move into that directory, otherwise a directory tree that resembles the backed up filesystem will be created in the current directory. See the examples below for details.</p>
<p>Amrecover should be run as root user.</p>
<p>Amrecover will the read the amanda-client.conf file and the config/amanda-client.conf file. If no configuration name is supplied on the command line, Amrecover will try the compiled-in default configuration, usually DailySet?1.</p>
<p>Edit the following lines in amanda-client.conf</p>
<p>conf &#8220;DailySet1&#8243; # your config name</p>
<p>index_server &#8220;ubuntulinux.co.in&#8221; # your amindexd server<br />
tape_server &#8220;ubuntulinux.co.in&#8221; # your amidxtaped server<br />
tapedev &#8220;file:/amandabackup/DailySet?1/slots&#8221; # your tape device</p>
<p>Example<br />
<strong>root@ubuntulinux:~# amrecover</strong><br />
AMRECOVER Version 2.5.1p3. Contacting server on localhost &#8230;<br />
220 ubuntulinux AMANDA index server (2.5.1p3) ready.<br />
Setting restore date to today (2008-04-22)<br />
200 Working date set to 2008-04-22.<br />
200 Config set to DailySet?1.<br />
200 Dump host set to ubuntulinux.co.in.<br />
Use the setdisk command to choose dump disk to recover<br />
<strong>amrecove</strong>r&gt; ls<br />
Must select a disk before listing files; use the setdisk command.<br />
<strong>amrecove</strong>r&gt; help<br />
valid commands are:</p>
<p>add path1 &#8230; &#8211; add to extraction list (shell wildcards)<br />
addx path1 &#8230; &#8211; add to extraction list (regular expressions)<br />
cd directory &#8211; change cwd on virtual file system (shell wildcards)<br />
cdx directory &#8211; change cwd on virtual file system (regular expressions)<br />
clear &#8211; clear extraction list<br />
delete path1 &#8230; &#8211; delete from extraction list (shell wildcards)<br />
deletex path1 &#8230; &#8211; delete from extraction list (regular expressions)<br />
extract &#8211; extract selected files from tapes<br />
exit<br />
help<br />
history &#8211; show dump history of disk<br />
list [filename] &#8211; show extraction list, optionally writing to file<br />
lcd directory &#8211; change cwd on local file system<br />
ls &#8211; list directory on virtual file system<br />
lpwd &#8211; show cwd on local file system<br />
mode &#8211; show the method used to extract SMB shares<br />
pwd &#8211; show cwd on virtual file system<br />
quit<br />
listhost &#8211; list hosts<br />
listdisk [diskdevice] &#8211; list disks<br />
setdate {YYYY-MM-DD|&#8211;MM-DD|&#8212;DD} &#8211; set date of look<br />
{YYYY-MM-DD-HH-MM-SS} &#8211; set date of look<br />
setdisk diskname [mountpoint] &#8211; select disk on dump host<br />
sethost host &#8211; select dump host<br />
settape [host:][device|default] &#8211; select tape server and/or device<br />
setmode smb|tar &#8211; select the method used to extract SMB shares</p>
<p><strong>amrecove</strong>r&gt; listhost<br />
200- List hosts for config DailySet1<br />
201- ubuntulinux.co.in<br />
200 List hosts for config DailySet1<br />
amrecover&gt; listdisk<br />
200- List of disk for host ubuntulinux.co.in<br />
201- /Project<br />
200 List of disk for host ubuntulinux.co.in<br />
amrecover&gt; setdisk /Project /Documents<br />
200 Disk set to /Project.<br />
amrecover&gt; lpwd<br />
/root<br />
<strong>amrecover&gt; ls</strong><br />
2008-04-22 ubunutlinux/<br />
2008-04-22 new/<br />
2008-04-22 myproject/<br />
2008-04-22 lost+found/</p>
<p></span></div>
<div><span style="font-size: small;"> </span></div>
<div><span style="font-size: small;"><strong>amrecover&gt; add myproject</strong><br />
Added dir /myproject/ at date 2008-04-22<br />
amrecover&gt; lpwd<br />
/root<br />
amrecover&gt; extract</p>
<p>Extracting files using tape drive @DEFAULT_TAPE_DEVICE@ on host localhost.<br />
The following tapes are needed: DailySet1-01</p>
<p>Restoring files into directory /root<br />
Continue [?/Y/n]? y</p>
<p>Extracting files using tape drive @DEFAULT_TAPE_DEVICE@ on host localhost.<br />
Load tape DailySet1-01 now<br />
Continue [/Y/n/s/t]? y<br />
Label mismatch, got DailySet?1-02 and expected DailySet?1-01<br />
Looking for tape DailySet?1-01&#8230;<br />
./myproject/<br />
./myproject/.bzr/<br />
./myproject/.bzr/branch/<br />
./myproject/.bzr/branch-lock/<br />
./myproject/.bzr/branch/lock/<br />
./myproject/.bzr/repository/<br />
./myproject/.bzr/repository/knits/<br />
./myproject/.bzr/repository/lock/<br />
./myproject/.bzr/repository/revision-store/<br />
./myproject/.bzr/README<br />
./myproject/.bzr/branch-format<br />
./myproject/.bzr/branch/branch-name<br />
./myproject/.bzr/branch/format<br />
./myproject/.bzr/branch/revision-history<br />
./myproject/.bzr/repository/format<br />
./myproject/.bzr/repository/inventory.kndx<br />
./myproject/.bzr/repository/inventory.knit<br />
./myproject/.bzr/repository/revisions.kndx<br />
./myproject/.bzr/repository/revisions.knit<br />
./myproject/.bzr/repository/signatures.kndx<br />
./myproject/.bzr/repository/signatures.knit<br />
amrecover&gt; quit<br />
200 Good bye.</p>
<p></span></div>
<p><a class="wp-caption" title=" Amanda Backup Using Virtual Tape on Ubuntu" href="http://ubuntulinux.co.in/blog/ubuntu/amanda-backup/" target="_self"><span style="font-size: small;">Page 1</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntulinux.co.in/blog/ubuntu/amandabackup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Amanda Backup Using Virtual Tape on Ubuntu</title>
		<link>http://ubuntulinux.co.in/blog/ubuntu/amanda-backup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=amanda-backup</link>
		<comments>http://ubuntulinux.co.in/blog/ubuntu/amanda-backup/#comments</comments>
		<pubDate>Fri, 28 May 2010 08:23:40 +0000</pubDate>
		<dc:creator>sahab</dc:creator>
				<category><![CDATA[Amanda]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu 10.04]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[Amanda Backup Using Virtual Tape on Ubuntu]]></category>
		<category><![CDATA[ubuntu backup tool]]></category>

		<guid isPermaLink="false">http://ubuntulinux.co.in/blog/?p=109</guid>
		<description><![CDATA[Amanda Backup Using Virtual Tape on Ubuntu]]></description>
			<content:encoded><![CDATA[<div><span style="font-family: Times New Roman; font-size: large;"><a href="../../Backup---Amanda-Setup-in-Ubuntu-7-10-with-Virtual-Tapes.php"><strong>Amanda Backup Using Virtual Tape on Ubuntu 7.10</strong></a></span></div>
<div><span style="font-family: Times New Roman; font-size: small;"> </span></div>
<div>
<h2><span style="font-family: Times New Roman; font-size: small;"><span style="text-decoration: underline;">Amanda:</span></span></h2>
<p><span style="font-family: Times New Roman; font-size: small;">AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that allows the administrator to set up a single master backup server to back up multiple hosts over network to tape drives/changers or disks or optical media. Amanda uses native dump and/or GNU tar facilities and can back up a large number of workstations running multiple versions of Unix.</span></p>
<p>This will guide you through setting up virtual tapes (utilize hard disk space for backups)<br />
<strong><br />
Install and Modify the xinetd</strong></p>
</div>
<div><span style="font-family: Times New Roman; font-size: small;"> </span></div>
<div><span style="font-family: Times New Roman; font-size: small;"> Create an amanda xinetd entry </span></div>
<div><span style="font-family: Times New Roman; font-size: small;"><br />
If you haven&#8217;t already installed xinetd, install it </span><span style="font-family: Times New Roman; font-size: small;"><br />
</span></div>
<div><span style="font-family: Times New Roman; font-size: small;"><strong>sudo apt-get install xinetd</strong></p>
<p>Create an amanda xinetd entry<br />
Code:</p>
<p><strong>sudo vim /etc/xinetd.d/amanda<br />
</strong><br />
Give it the following contents<br />
Code:</p>
<p># default: on<br />
# description: The amanda service<br />
service amanda<br />
{<br />
only_from            = ubunutlinux.co.in<br />
disable                  = no<br />
socket_type         = dgram<br />
protocol                = udp<br />
wait                        = yes<br />
user                        = backup<br />
group                     = backup<br />
groups                   = yes<br />
server                     = /usr/lib/amanda/amandad<br />
server_args           = -auth=bsd amdump amindexd amidxtaped<br />
}<br />
service amandaidx<br />
{<br />
socket_type             = stream<br />
protocol                    = tcp<br />
wait                            = no</p>
<p></span><span style="font-family: Times New Roman; font-size: small;"> user                             = backup<br />
</span><span style="font-family: Times New Roman; font-size: small;"> group                          = backup<br />
groups                        = yes<br />
server                          = /usr/lib/amanda/amindexd<br />
disable                        = no<br />
}<br />
service amidxtape<br />
{<br />
socket_type             = stream<br />
protocol                   = tcp<br />
wait                           = no<br />
user                           = backup<br />
group                       = backup<br />
groups                     = yes<br />
server                       = /usr/lib/amanda/amidxtaped<br />
disable                     = no<br />
}</p>
<p><strong>Install the AMANDA Server</strong></p>
<p>Install AMANDA and dependencies</p>
<p><strong>sudo apt-get install amanda-server</strong></p>
<p>Restart xinetd</p>
<p><strong>sudo /etc/init.d/xinetd restart</strong></p>
<p>Become &#8220;backup&#8221; user</p>
<p><strong>su backup</strong></p>
<p>Create copies of the configuration files, just in case</p>
<p><strong> cp -R /etc/amanda/DailySet1 /etc/amanda/DailySet1.bak</strong></p>
<p>Edit amanda.conf</p>
<p>Let&#8217;s get in and edit the amanda.conf<br />
Code:</p>
<p><strong>vim /etc/amanda/DailySet?1/amanda.conf</strong></p>
<p>Make the following changes in the file<br />
Code:</p>
<p>org “&#8221;<br />
mailto &#8220;backupadmin@ubuntulinux.co.in &#8221;<br />
tpchanger &#8220;chg-disk&#8221;<br />
changerfile &#8220;/etc/amanda/daily/changer&#8221;<br />
tapedev &#8220;file:/amandabackup/DailySet1/slots&#8221;<br />
tapetype HARDDISK<br />
#tapetype HP-DAT   &lt;&#8212; comment this out<br />
#labelstr &#8220;^HISS[0-9][0-9]*$&#8221;           &lt;&#8212; comment this out<br />
amrecover_do_fsf yes<br />
amrecover_check_label yes<br />
amrecover_changer &#8220;changer&#8221;<br />
define tapetype HARDDISK {<br />
length  mbytes<br />
}<br />
<strong> </strong></p>
<p></span></div>
<div><span style="font-family: Times New Roman; font-size: small;"><strong>Edit disklist<br />
</strong><br />
The format for the disklist file is :</p>
<p>Dumptypes are deinfed in /etc/amanda/amanda.conf, but we&#8217;ll use the GNUTAR dumptype &#8220;comp-user-tar&#8221; for this example</p>
<p>Let&#8217;s get in and edit the disklist<br />
Code:</p>
<p>vim /etc/amanda/DailySet1/disklist</p>
<p>Add a line like so<br />
Code:</p>
<p>ubuntulinux.co.in /Project comp-user-tar</p>
<p>ubuntlinux.co.in  /clientbackup comp-user-tar</p>
<p>What this line is telling AMANDA is that when it attempts to do a dump that it should connect to ubuntlinux.co.in, backup the directory /project and /clientbackup and user the options that are defined in amanda.conf for the &#8220;comp-user-tar&#8221; dumptype.<br />
<strong><br />
Create Virtual Tapes</strong></p>
<p>Choose a location for your tapes to reside</p>
<p></span></div>
<div><span style="font-family: Times New Roman; font-size: small;"> Here we using /amandabackups/</p>
<p>Create the tapelist file that is necessary for indexing tapes available<br />
Code:</p>
<p><strong>touch /etc/amanda/DailySet1/tapelist<br />
</strong><br />
Create the location and set permissions for the virtual tapes<br />
Code:</p>
<p><strong>mkdir -p -m 770 /amandabackup/DailySet1/slots</strong></p>
<p><strong> chown -R backup:backup /amdndahosts</strong></p>
<p>CD to the new directory</p>
<p><strong>cd /amandabackup/DailySet1/slots</strong></p>
<p>Create the necessary directories for the tapes<br />
Code:</p>
<p><strong>for (i=1; $i&lt;=25; i++)?; do mkdir slot$i; done<br />
</strong><br />
Create symlink for the data directory to point to the first tape<br />
Code:</p>
<p><strong> ln -s slot1 data</strong></p>
<p>Test the vtapes to be sure that we get an ONLINE message<br />
Code:</p>
<p><strong>ammt -f file:/amandabackup/DailySet?1/slots status</strong></p>
<p>Label the tapes</p>
<p><strong>for (i=1; $i&lt;=9; i++)?; do amlabel DailySet1 DailySet?1-0$i slot $i; done</strong></p>
<p><strong>for (i=10; $i&lt;=25; i++)?; do amlabel DailySet1 DailySet?1-$i slot $i; done</strong></p>
<p>Output should look like (for each slot)</p>
<p><strong> labeling tape in slot 1 (file:/amandabackup/DailySet?1/slots)<br />
rewinding, reading label, not an amanda tape<br />
rewinding, writing label DailySet?1-01, checking label, done.</strong></p>
<p>Reset the changer back to slot 1</p>
<p><strong>amtape DailySet1 reset</strong></p>
<p>Output should look like</p>
<p><strong> amtape: changer is reset, slot 1 is loaded.</strong></p>
<p><strong>Edit .amandahosts</strong></p>
<p>On Ubuntu the .amandahosts file is located as /etc/amandahosts</p>
<p>Open the file</p>
<p>vim /etc/amandahosts</p>
<p>The file looks like</p>
<p></span></div>
<div><span style="font-family: Times New Roman; font-size: small;"> <strong> localhost backup<br />
localhost root amindexd amidxtaped<br />
ubuntlinux.co.in backup</strong></p>
<p><strong>ubuntlinux.co.in backup amindexd amidxtaped</strong><br />
<strong> ubuntlinux.co.in root amindexd amidxtaped</strong></p>
<p></span></div>
<div><span style="font-family: Times New Roman; font-size: small;"> </span></div>
<p><span style="font-family: Times New Roman; font-size: small;"><a href="http://ubuntulinux.co.in/blog/ubuntu/amandabackup/" target="_self">Page 2</a> (amanda client and backup and restore procedure</span></p>
]]></content:encoded>
			<wfw:commentRss>http://ubuntulinux.co.in/blog/ubuntu/amanda-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

