Backup su File con Amanda: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
m New page: *http://wiki.zmanda.com/index.php/How_To:Set_Up_Virtual_Tapes *http://wiki.zmanda.com/index.php/How_To:Backup_to_Virtual_Tapes_on_a_Windows_Server
 
mNo edit summary
 
Line 1: Line 1:
*http://wiki.zmanda.com/index.php/How_To:Set_Up_Virtual_Tapes
* Definire il tapetype:
 
sudoedit /etc/amanda/DailySet1/amanda.conf
 
<pre>
define tapetype VIRTUAL {
    comment "Dump onto hard disk"
    length 198 Gbytes # specified in mbytes to get the exact size of 3GB
}
</pre>
 
* Impostare il tapetype:
 
sudoedit /etc/amanda/DailySet1/amanda.conf
 
tapetype VIRTUAL
 
* Impostare il tape-changer
 
sudoedit /etc/amanda/DailySet1/amanda.conf
 
<pre>
tpchanger "chg-disk"
tapedev "file:/files/amandatapes/DailySet01/slots"
changerfile "/files/amandatapes/DailySet01/chg-disk-status"    # status files prefix
# changerdev is ignored
</pre>
 
* Impostare il numero di nastri:
 
sudoedit /etc/amanda/DailySet1/amanda.conf
 
tapecycle 24
 
* Creare le directory per i nastri
sudo  mkdir -p /files/amandatapes/DailySet01/slots
sudo chown -R backup: /files/amandatapes
sudo -i -u backup
 
cd /files/amandatapes/DailySet01/slots
TAPENUMS=$(seq 1 24)
for i in $TAPENUMS; do mkdir -p slot$i; done
ln -s slot1 data
 
* Verificare:
ls -al
<pre>
drwxr-xr-x 26 backup backup 4096 2010-03-22 12:24 .
drwxr-xr-x  3 backup backup 4096 2010-03-22 12:16 ..
lrwxrwxrwx  1 backup backup    5 2010-03-22 12:24 data -> slot1
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot1
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot10
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot11
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot12
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot13
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot14
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot15
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot16
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot17
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot18
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot19
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot2
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot20
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot21
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot22
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot23
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot24
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot3
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot4
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot5
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot6
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot7
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot8
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot9
</pre>
 
*Labeling dei tapes:
touch /etc/amanda/DailySet1/tapelist
for i in $TAPENUMS; do amlabel DailySet1 Tape-$i slot $i; done
 
* Controllare:
amcheck DailySet1
 
<pre>
Amanda Tape Server Host Check
-----------------------------
slot 24: read label `Tape-24', date `X'
NOTE: skipping tape-writable test
Tape Tape-24 label ok
NOTE: host info dir /var/lib//amanda/DailySet1/curinfo/galstorage01 does not exist
NOTE: it will be created on the next run.
NOTE: index dir /var/lib/amanda/DailySet1/index/galstorage01 does not exist
NOTE: it will be created on the next run.
Server check took 0.058 seconds
 
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.036 seconds, 0 problems found
 
(brought to you by Amanda 2.5.2p1)
</pre>
 
* Controllare il funzionamento del changer:
amtape DailySet1 show
 
<pre>
amtape: scanning all 24 slots in tape-changer rack:
slot 23: date X        label Tape-23
slot 24: date X        label Tape-24
slot 1: date X        label Tape-1
slot 2: date X        label Tape-2
slot 3: date X        label Tape-3
slot 4: date X        label Tape-4
slot 5: date X        label Tape-5
slot 6: date X        label Tape-6
slot 7: date X        label Tape-7
slot 8: date X        label Tape-8
slot 9: date X        label Tape-9
slot 10: date X        label Tape-10
slot 11: date X        label Tape-11
slot 12: date X        label Tape-12
slot 13: date X        label Tape-13
slot 14: date X        label Tape-14
slot 15: date X        label Tape-15
slot 16: date X        label Tape-16
slot 17: date X        label Tape-17
slot 18: date X        label Tape-18
slot 19: date X        label Tape-19
slot 20: date X        label Tape-20
slot 21: date X        label Tape-21
slot 22: date X        label Tape-22
</pre>
 
* Resettare il changer:
amtape DailySet1 reset
 
amtape: changer is reset, slot 1 is loaded.
 
* Testare il backup
amdump DailySet1
 
* Verificare con
watch sudo -u backup amstatus DailySet1
 
 
==Riferimenti==
*[http://wiki.zmanda.com/index.php/How_To:Set_Up_Virtual_Tapes How To:Set Up Virtual Tapes - The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)]
*http://wiki.zmanda.com/index.php/How_To:Backup_to_Virtual_Tapes_on_a_Windows_Server
*http://wiki.zmanda.com/index.php/How_To:Backup_to_Virtual_Tapes_on_a_Windows_Server

Latest revision as of 11:52, 22 March 2010

  • Definire il tapetype:
sudoedit /etc/amanda/DailySet1/amanda.conf
define tapetype VIRTUAL {
    comment "Dump onto hard disk"
    length 198 Gbytes 	# specified in mbytes to get the exact size of 3GB
}
  • Impostare il tapetype:
sudoedit /etc/amanda/DailySet1/amanda.conf 
tapetype VIRTUAL
  • Impostare il tape-changer
sudoedit /etc/amanda/DailySet1/amanda.conf
tpchanger "chg-disk"
tapedev "file:/files/amandatapes/DailySet01/slots"
changerfile "/files/amandatapes/DailySet01/chg-disk-status"    # status files prefix
# changerdev is ignored
  • Impostare il numero di nastri:
sudoedit /etc/amanda/DailySet1/amanda.conf
tapecycle 24
  • Creare le directory per i nastri
sudo  mkdir -p /files/amandatapes/DailySet01/slots
sudo chown -R backup: /files/amandatapes
sudo -i -u backup
cd /files/amandatapes/DailySet01/slots
TAPENUMS=$(seq 1 24)
for i in $TAPENUMS; do mkdir -p slot$i; done
ln -s slot1 data
  • Verificare:
ls -al

drwxr-xr-x 26 backup backup 4096 2010-03-22 12:24 .
drwxr-xr-x  3 backup backup 4096 2010-03-22 12:16 ..
lrwxrwxrwx  1 backup backup    5 2010-03-22 12:24 data -> slot1
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot1
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot10
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot11
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot12
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot13
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot14
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot15
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot16
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot17
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot18
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot19
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot2
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot20
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot21
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot22
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot23
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot24
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot3
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot4
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot5
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot6
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot7
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot8
drwxr-xr-x  2 backup backup 4096 2010-03-22 12:18 slot9
  • Labeling dei tapes:
touch /etc/amanda/DailySet1/tapelist
for i in $TAPENUMS; do amlabel DailySet1 Tape-$i slot $i; done
  • Controllare:
amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
slot 24: read label `Tape-24', date `X'
NOTE: skipping tape-writable test
Tape Tape-24 label ok
NOTE: host info dir /var/lib//amanda/DailySet1/curinfo/galstorage01 does not exist
NOTE: it will be created on the next run.
NOTE: index dir /var/lib/amanda/DailySet1/index/galstorage01 does not exist
NOTE: it will be created on the next run.
Server check took 0.058 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.036 seconds, 0 problems found

(brought to you by Amanda 2.5.2p1)
  • Controllare il funzionamento del changer:
amtape DailySet1 show
amtape: scanning all 24 slots in tape-changer rack:
slot 23: date X        label Tape-23
slot 24: date X        label Tape-24
slot 1: date X        label Tape-1
slot 2: date X        label Tape-2
slot 3: date X        label Tape-3
slot 4: date X        label Tape-4
slot 5: date X        label Tape-5
slot 6: date X        label Tape-6
slot 7: date X        label Tape-7
slot 8: date X        label Tape-8
slot 9: date X        label Tape-9
slot 10: date X        label Tape-10
slot 11: date X        label Tape-11
slot 12: date X        label Tape-12
slot 13: date X        label Tape-13
slot 14: date X        label Tape-14
slot 15: date X        label Tape-15
slot 16: date X        label Tape-16
slot 17: date X        label Tape-17
slot 18: date X        label Tape-18
slot 19: date X        label Tape-19
slot 20: date X        label Tape-20
slot 21: date X        label Tape-21
slot 22: date X        label Tape-22
  • Resettare il changer:
amtape DailySet1 reset
amtape: changer is reset, slot 1 is loaded.
  • Testare il backup
amdump DailySet1
  • Verificare con
watch sudo -u backup amstatus DailySet1


Riferimenti