PDA

View Full Version : How to backup master



grouch53
August 24th, 2010, 01:10 AM
Hi folks

Sorry if this is RTFM but I could not relate to other posts

Being a newbie in amanda I installed the server version on one of our systems, using amanda-backup-server_3.1.2-1Debian50_amd64.deb. I am using a OVERLAND virtual tape library through an ISCSI connection. there are basically 2 questions popping up now

Here is the output of amcheck

amandabackup@subversion:~$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
slot 10: volume 'subversion-00010'
Will write to volume 'subversion-00010' in slot 10.

>>>>>>>>>>>>>>>>>>>>>>>>>>

Why is it using the last tape in the set? Maybe I don't need to worry.

>>>>>>>>>>>>>>>>>>>>>>>>>>


NOTE: skipping tape-writable test
NOTE: host info dir /etc/amanda/DailySet1/curinfo/subversion.ruf.ch does not exist
NOTE: it will be created on the next run.
NOTE: index dir /etc/amanda/DailySet1/index/subversion.ruf.ch does not exist
NOTE: it will be created on the next run.
Server check took 0.305 seconds

Amanda Backup Client Hosts Check
--------------------------------
WARNING: subversion.ruf.ch: selfcheck request failed: timeout waiting for ACK
Client check: 1 host checked in 30.032 seconds. 1 problem found.

(brought to you by Amanda 3.1.2)

Looks like the client part is missing, which makes sense as I only installed the server. However trying to install the client component too results in a conflict.

subversion:/home/administrator/amanda# dpkg -i amanda-backup-client_3.1.2-1Debian50_amd64.deb
dpkg: regarding amanda-backup-client_3.1.2-1Debian50_amd64.deb containing amanda-backup-client:
amanda-backup-client conflicts with amanda-backup-server
amanda-backup-server (version 3.1.2-1Debian50) is present and installed.
dpkg: error processing amanda-backup-client_3.1.2-1Debian50_amd64.deb (--install):
conflicting packages - not installing amanda-backup-client
Errors were encountered while processing:
amanda-backup-client_3.1.2-1Debian50_amd64.deb

I think this is rather irritating. How is one supposed to install the client on a server?


Here is some more information from the amcheck log

Wed Aug 25 13:37:51 2010: amcheck-clients: dgram_send_addr(addr=0x15dcb90, dgram=0x7f3229654a48)
Wed Aug 25 13:37:51 2010: amcheck-clients: (sockaddr_in *)0x15dcb90 = { 2, 10080, 172.29.4.84 }
Wed Aug 25 13:37:51 2010: amcheck-clients: dgram_send_addr: 0x7f3229654a48->socket = 4
Wed Aug 25 13:38:01 2010: amcheck-clients: dgram_send_addr(addr=0x15dcb90, dgram=0x7f3229654a48)
Wed Aug 25 13:38:01 2010: amcheck-clients: (sockaddr_in *)0x15dcb90 = { 2, 10080, 172.29.4.84 }
Wed Aug 25 13:38:01 2010: amcheck-clients: dgram_send_addr: 0x7f3229654a48->socket = 4
Wed Aug 25 13:38:11 2010: amcheck-clients: security_seterror(handle=0x15dcb50, driver=0x7f3229649540 (BSD) error=timeout waiting for ACK)

This leads me to believe, that somehow the client cannot be reached. I _guess_ on the server and client we need to install different serrvices. If both live on one machine we might need different ports for these services.

Right now I have the following services defined for xinetd

# description: The amanda index service
service amandaidx
{
# only_from = <Amanda client list>
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/libexec/amanda/amindexd
server_args = -auth=bsd amdump amindexd amidxtaped
disable = no
}
~
#
# description: Amanda services for Amanda server and client.
#

service amanda
{
disable = no
flags = IPv4
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/libexec/amanda/amandad
server_args = -auth=bsd amdump amindexd amidxtaped
}
~
~
service amidxtape
{
socket_type = stream
protocol = tcp
wait = no
user = amandabackup
group = disk
groups = yes
server = /usr/libexec/amanda/amidxtaped
server_args = -auth=bsd amdump amindexd amidxtaped
disable = no
}
~
Do I need to define an additional service for the client?

cheers

Erich

Charles Curley
August 26th, 2010, 03:29 PM
Why is it using the last tape in the set? Maybe I don't need to worry.

Amanda will refuse to write over a current tape, so it doesn't really matter which tape it starts with.


subversion:/home/administrator/amanda# dpkg -i amanda-backup-client_3.1.2-1Debian50_amd64.deb
dpkg: regarding amanda-backup-client_3.1.2-1Debian50_amd64.deb containing amanda-backup-client:
amanda-backup-client conflicts with amanda-backup-server
amanda-backup-server (version 3.1.2-1Debian50) is present and installed.
dpkg: error processing amanda-backup-client_3.1.2-1Debian50_amd64.deb (--install):
conflicting packages - not installing amanda-backup-client
Errors were encountered while processing:
amanda-backup-client_3.1.2-1Debian50_amd64.deb

I think this is rather irritating. How is one supposed to install the client on a server?


Is xinetd installed and running?

ps aux | grep -i xinetd

I seem to recall that the server package includes the client code, so the client may already be installed. Check to see if it is present:

ls -l /usr/libexec/amanda/amandad

(xinetd runs programs such as ftp servers, http servers, etc, so in the xinetd configuration file it refers to the server. From amanda's point of view, this is the client.)



This leads me to believe, that somehow the client cannot be reached. I _guess_ on the server and client we need to install different serrvices. If both live on one machine we might need different ports for these services.


Nope, they cohabit just fine. The amanda server program tries to make a connection from a port which is not the destination port. Most client programs do the same; e.g. your web browser never sends out on port 80.

grouch53
August 30th, 2010, 11:05 PM
Indeed, the server package includes the client and they coexist. So far so good I can now backup the server and I installed one client system. Backup reports look OK but when I try amrecover on the client (Debian Lenny, just like the server) I cannot see any backed up data, only some kind of a timestamp.

lx01:~# amrecover -h srvx-lx01-afa.ruf.group
AMRECOVER Version 3.1.2. Contacting server on subversion.ruf.ch ...
220 subversion AMANDA index server (3.1.2) ready.
Setting restore date to today (2010-08-31)
200 Working date set to 2010-08-31.
200 Config set to DailySet1.
200 Dump host set to srvx-lx01-afa.ruf.group.
Use the setdisk command to choose dump disk to recover
amrecover> listdisk
200- List of disk for host srvx-lx01-afa.ruf.group
201- /
201- /home
201- /var
200 List of disk for host srvx-lx01-afa.ruf.group
amrecover> setdisk /home
200 Disk set to /home.
amrecover> lcd /tmp
amrecover> ls
2010-08-31-01-00-03 .
amrecover>

The disklist file looks like this

srvx-lx01-afa.ruf.group / nocomp-root
srvx-lx01-afa.ruf.group /home comp-user-span
srvx-lx01-afa.ruf.group /var comp-user-span

Here is the dump report, the root directory was commented out, sorry for the linebreaks

DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-MB OUT-MB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- --------------
srvx-lx01-af /home 1 1 0 0.4 0:42 0.2 0:00 60.0
srvx-lx01-af /var 1 109 6 5.4 0:09 641.9 0:01 5990.0
subversion.r / 1 2 2 99.9 0:05 325.1 0:00 17400.0
subversion.r /backup 2 12682 12321 97.2 94:43 2220.1 25:01 8405.3
subversion.r /home 0 9854 4728 48.0 11:54 6785.2 19:25 4155.7
subversion.r /var 1 2 0 8.3 0:02 93.4 0:00 1640.0

cheers

Erich

Charles Curley
September 4th, 2010, 02:27 PM
lx01:~# amrecover -h srvx-lx01-afa.ruf.group
AMRECOVER Version 3.1.2. Contacting server on subversion.ruf.ch ...
220 subversion AMANDA index server (3.1.2) ready.
Setting restore date to today (2010-08-31)
200 Working date set to 2010-08-31.
200 Config set to DailySet1.
200 Dump host set to srvx-lx01-afa.ruf.group.
Use the setdisk command to choose dump disk to recover
amrecover> listdisk
200- List of disk for host srvx-lx01-afa.ruf.group
201- /
201- /home
201- /var
200 List of disk for host srvx-lx01-afa.ruf.group
amrecover> setdisk /home
200 Disk set to /home.
amrecover> lcd /tmp
amrecover> ls
2010-08-31-01-00-03 .
amrecover>

It looks good to me up to here. That line is the amrecover directory entry for the directory "." which is in all Unix directories. It is not showing any other files or directories, which is disconcerting. For contrast, one of my machines' /home directory looks like this:


amrecover> setdisk /home
200 Disk set to /home.
amrecover> ls
2010-09-03 ccurley/
2010-09-03 .
amrecover>



The disklist file looks like this

srvx-lx01-afa.ruf.group / nocomp-root
srvx-lx01-afa.ruf.group /home comp-user-span
srvx-lx01-afa.ruf.group /var comp-user-span





Here is the dump report, the root directory was commented out, sorry for the linebreaks

DUMP SUMMARY:
DUMPER STATS TAPER STATS
HOSTNAME DISK L ORIG-MB OUT-MB COMP% MMM:SS KB/s MMM:SS KB/s
-------------------------- ------------------------------------- --------------
srvx-lx01-af /home 1 1 0 0.4 0:42 0.2 0:00 60.0



It looks like it did a level one backup, so it got something. Unless there was a previous level 0 having an empty directory is perfectly possible: the level 1 didn't find anything since the last level 0 backup.

I'd go ahead and run daily dumps for a while and see what you get.

And take a look at "subversion.r /home", which is a level 0 (total) backup with a respectable data set.




srvx-lx01-af /var 1 109 6 5.4 0:09 641.9 0:01 5990.0
subversion.r / 1 2 2 99.9 0:05 325.1 0:00 17400.0
subversion.r /backup 2 12682 12321 97.2 94:43 2220.1 25:01 8405.3
subversion.r /home 0 9854 4728 48.0 11:54 6785.2 19:25 4155.7
subversion.r /var 1 2 0 8.3 0:02 93.4 0:00 1640.0

grouch53
September 7th, 2010, 11:46 PM
Hi

Thanks, I believe I made some progress, but recover still poses problems, I opened a new thread, "amrecover failure".

Erich