PostgreSQLスキルアップノート(自己啓発のための個人サイト)

番外編・Amanda3.1・その他メモ


【一覧に戻る】


ごく簡単に確認した程度です。

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
■■■■                                                                        
■■■■ Amanda 3.1 検証 
■■■■
■◆■■  番外編・Amanda3.1・その他メモ
■■■■                                                                        
■■■■ 2012/03                                                       
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

アマンダにはコミュニティ版の他、有償のエンタープライズ版がある。



■■公式サイト

アマンダプロジェクト
http://www.amanda.org/




■■インストールで作成された主なディレクトリ

以下の他、/usr/sbinにコマンド類が格納 主にamで始まる


【□】 ls -l /var/lib/amanda

合計 20
-rw-r--r-- 1 amandabackup disk   41  2月 22 03:55 amanda-release
-rw-r----- 1 amandabackup disk    0  3月 20 01:48 amandates
drwxr-xr-x 3 amandabackup disk 4096  3月 20 07:33 example★
drwxr-xr-x 2 amandabackup disk 4096  2月 22 03:55 gnutar-lists
drwxr-xr-x 2 amandabackup disk 4096  3月 20 07:33 template.d
drwxr-xr-x 2 amandabackup disk 4096  3月 20 06:23 test1
-bash-3.2$


【□】 ls -l /var/lib/amanda/example

合計 72
-rwxr-xr-x 1 amandabackup disk  1878  2月 22 03:55 amanda-client-postgresql.conf
-rwxr-xr-x 1 amandabackup disk   793  2月 22 03:55 amanda-client.conf
-rwxr-xr-x 1 amandabackup disk 28056  2月 22 03:55 amanda.conf
-rwxr-xr-x 1 amandabackup disk  2623  2月 22 03:55 chg-multi.conf
-rwxr-xr-x 1 amandabackup disk  1189  2月 22 03:55 chg-scsi.conf
-rwxr-xr-x 1 amandabackup disk  3236  2月 22 03:55 disklist
-rwxr-xr-x 1 amandabackup disk   114  2月 22 03:55 inetd.conf.amandaserver
drwxr-xr-x 2 amandabackup disk  4096  3月 20 07:33 label-templates
-rwxr-xr-x 1 amandabackup disk   392  2月 22 03:55 xinetd.amandaclient
-rwxr-xr-x 1 amandabackup disk   471  2月 22 03:55 xinetd.amandaserver



【□】 ls -l /var/lib/amanda/template.d

-rwxr-xr-x 1 amandabackup disk  1027  2月 22 03:55 README
-rwxr-xr-x 1 amandabackup disk  6635  2月 22 03:55 advanced.conf
-rwxr-xr-x 1 amandabackup disk  2123  2月 22 03:55 amanda-S3.conf
-rwxr-xr-x 1 amandabackup disk  2325  2月 22 03:55 amanda-harddisk.conf★
-rwxr-xr-x 1 amandabackup disk  1873  2月 22 03:55 amanda-single-tape.conf
-rwxr-xr-x 1 amandabackup disk  1910  2月 22 03:55 amanda-tape-changer.conf
-rwxr-xr-x 1 amandabackup disk   400  2月 22 03:55 chg-manual.conf
-rwxr-xr-x 1 amandabackup disk 13026  2月 22 03:55 dumptypes
-rwxr-xr-x 1 amandabackup disk  7125  2月 22 03:55 tapetypes

[root@dbsv slot1]# ls -l /etc/amanda
-rw------- 1 amandabackup disk  793  3月 20 01:48 amanda-client.conf



■■amanda.confのサンプル

標準提供のamanda.confとは別に、仮想ライブラリ用のサンプルがtemplate.dがある。
amanda-harddisk.conf
仮想ライブラリを使う場合は以下の内容をカスタマイズして使用。



【□】 cat /var/lib/amanda/template.d/amanda-harddisk.conf


org "DailySet1"         # your organization name for reports
mailto "amandabackup"        # space separated list of operators at your site
dumpcycle 1 week               # the number of days in the normal dump cycle
runspercycle 5                 # the number of amdump runs in dumpcycle days
                               # (1 week * 5 amdump runs per week -- just weekdays)
tapecycle 10 tapes             # the number of tapes in rotation
                               # 1 week (dumpcycle) times 5 tapes per week (just
                               # the weekdays) plus a few to handle errors that
                               # need amflush and so we do not overwrite the full
                               # backups performed at the beginning of the previous
                               # cycle
runtapes 1                     # number of tapes to be used in a single run of amdump

define changer my_vtapes {
    tpchanger "chg-disk://usr/var/lib/amanda/vtapes/DailySet1"
    property "num-slot" "10"
    property "auto-create-slot" "yes"
}
tpchanger "my_vtapes"
tapetype HARDDISK               # what kind of tape it is
labelstr "^DailySet1-[0-9][0-9]*$"    # label constraint regex: all tapes must match
dtimeout 1800                          # number of idle seconds before a dump is aborted.
ctimeout 30                            # maximum number of seconds that amcheck waits
                                       # for each client host
etimeout 300                           # number of seconds per filesystem for estimates.

define dumptype global {
        comment "Global definitions"
        auth "bsdtcp"
}

#define application-tool and dumptype for the amgtar application
define application-tool app_amgtar {
    comment "amgtar"
    plugin  "amgtar"
    #property "GNUTAR-PATH" "/path/to/gtar"
    #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir"
}

define dumptype gui-base {
        global
        program "APPLICATION"
        application "app_amgtar"
        comment "gui base dumptype dumped with tar"
        compress none
        index yes
}

define tapetype HARDDISK {
    comment "Virtual Tapes"
    length 5000 mbytes
    part_size 500 mbytes
    part_cache_type none
}

includefile "./advanced.conf"
includefile "/etc/amanda/template.d/dumptypes"
includefile "/etc/amanda/template.d/tapetypes"





■■disklistのサンプル

意味不明の設定が多く、サンプルの大半を削除して置き換え



【□】 cat /var/lib/amanda/example/disklist



-bash-3.2$  cat /var/lib/amanda/example/disklist
# sample Amanda2 disklist file, derived from CS.UMD.EDU's disklist
#
# If your configuration is called, say, "csd2", then this file normally goes
# in /etc/amanda/csd2/disklist.
#
# File format is:
#
#       hostname diskdev dumptype [spindle [interface]]
#
# where the dumptypes are defined by you in amanda.conf or in-line.

# At our site, root partitions have a different dumptype because they
# are of lower priority; they don't contain user data, and don't change
# much from the department prototype.  In a crunch, they can be left for
# last or skipped.

# A SPARCstation 1+
salty sd0a comp-root
salty sd0g comp-user
salty sd1g comp-user
salty sd2a comp-root
salty sd2g comp-user
salty sd3c comp-user

# A DECstation 3100
slithy rz1a comp-root
slithy rz1g comp-user
slithy rz3a comp-root
slithy rz3g comp-user

# We don't run compression on the master host since it is going to be
# busy enough running amanda.
master sd0a nocomp-root -1 local
master sd0g nocomp-user -1 local
# note: -1 is a placeholder for the spindle number
# the holding disk can't be dumped to itself, it uses a disktype that
# specifies the "no-hold" option (see amanda.conf).
master sd1c holding-disk -1 local

# Compress data from a slow server on the tape server.
# Example of inline dumptype specialization
slowsrv / { # the line break here is mandatory
  root-tar # copy properties of root-tar
  compress server fast # but change the compression mode
} # spindle and interface omitted here
slowsrv /usr {
  user-tar
  exclude list ".exclude"
  compress server fast
} 2 le0 # no line break before spindle and interface

# The chairman's disk is high priority to make sure it gets done.
bigwig  sd0a comp-root
bigwig  sd0g comp-high
# Likewise the named databases in the root partition on our primary
# nameserver.  Also, compression is turned off because we don't want
# to create any unnecessary load on this baby (it's only a Sun3).
bozo        sd0a nocomp-high
bozo        sd0g nocomp-user
bozo        sd4c nocomp-user

# Dump Joe's NetBSD machine, with the mounted MS-DOS partition dumped
# using tar.
joespc  wd0a comp-root
joespc  wd0e comp-user
joespc  /msdos comp-user-tar

# Some really slow machines, like Sun2's and some Vaxstations, take
# forever to compress their dumps: it's just not worth it.

# A Sun2
cleo     sd0a nocomp-root
cleo     sd0g nocomp-user
# A VaxStation
susie         rz8a nocomp-root
susie         rz8g nocomp-user

# An example of how to separate a big disk (/diskA) in multiple smaller entry
# using GNUTAR.
# I suggest to always use the diskdevice in the diskname.
# Don't forget to use the same spindle for all entry.
hosta /diskA/all /diskA {
        # all directories except the one that start with [a-u]
        high-tar
        exclude "./[a-u]*"
        } 1
hosta /diskA/ag /diskA {
        # all directories that start with [a-g] except big1 and big2
        high-tar
        include "./[a-g]*"
        exclude "./big1" "./big2"
        } 1
hosta /diskA/big /diskA {
        # directories big1 and big2
        high-tar
        include "./big1" "./big2"
        } 1
hosta /diskA/gm /diskA {
        # all directories that start with [h-m]
        high-tar
        include "./[h-m]*"
        } 1
hosta /diskA/nu /diskA {
        # all directories that start with [n-u]
        high-tar
        include "./[n-u]*"
        } 1


# and so on ... well, you get the idea

以上 
inserted by FC2 system