Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
Localhost Backup
This section describes how to backup specified directories on a single host to a local tape drive. • First, the Storage device needs to be configured. Edit /etc/bacula/bacula−sd.conf add: De v ic e { Name = ”Tape Drive ” Dev ic e Type = t a p e Media Type = DDS−4 A r c h i v e D e vi ce = / dev / s t 0 Hardware end o f medium = No ; AutomaticMount = y e s ; # when d e v i c e opened , r e a d i t AlwaysOpen = Yes ; RemovableMedia = y e s ; RandomAccess = no ; A l e r t Command = ” sh −c ’ t a p e i n f o −f %c | g r e p TapeAlert ’ ” } The example is for a DDS-4 tape drive. Adjust the “Media Type” and “Archive Device” to match your hardware. You could also uncomment one of the other examples in the file. • After editing /etc/bacula/bacula−sd.conf the Storage daemon will need to be restarted: sudo s y s t e m c t l r e s t a r t bacula −sd . s e r v i c e • Now add a Storage resource in /etc/bacula/bacula−dir.conf to use the new Device: # D e f i n i t i o n o f ”Tape Drive ” s t o r a g e d e v i c e S t o r a g e { Name = TapeDrive # Do not u s e ” l o c a l h o s t ” h e r e Address = b a c k u p s e r v e r # N. B . Use a f u l l y q u a l i f i e d name h e r e SDPort = 9103 Password = ” Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyjc ” 291 Dev ic e = ”Tape Drive ” Media Type = t a p e } The Address directive needs to be the Fully Qualified Domain Name (FQDN) of the server. Change backupserver to the actual host name. Also, make sure the Password directive matches the password string in /etc/bacula/bacula−sd.conf. • Create a new FileSet, which will determine what directories to backup, by adding: # LocalhostBacup F i l e S e t . F i l e S e t { Name = ” L o c a l h o s t F i l e s ” I n c l u d e { Options { s i g n a t u r e = MD5 c o m p r e s s i o n=GZIP } F i l e = / e t c F i l e = /home } } This FileSet will backup the /etc and /home directories. The Options resource directives configure the FileSet to create an MD5 signature for each file backed up, and to compress the files using GZIP. • Next, create a new Schedule for the backup job: # LocalhostBackup S c h e d u l e −− D a i l y . S c h e d u l e { Name = ” L o c a l h o s t D a i l y ” Run = F u l l d a i l y a t 0 0 : 0 1 } The job will run every day at 00:01 or 12:01 am. There are many other scheduling options available. • Finally create the Job: # L o c a l h o s t backup . Job { Name = ” LocalhostBackup ” JobDefs = ” D e f a u l t J o b ” Enabled = y e s L e v e l = F u l l F i l e S e t = ” L o c a l h o s t F i l e s ” S c h e d u l e = ” L o c a l h o s t D a i l y ” S t o r a g e = TapeDrive Write B o o t s t r a p = ”/ var / l i b / b a c u l a / LocalhostBackup . b s r ” } The job will do a Full backup every day to the tape drive. • Each tape used will need to have a Label. If the current tape does not have a label Bacula will send an email letting you know. To label a tape using the Console enter the following from a terminal: b c o n s o l e • At the Bacula Console prompt enter: 292 l a b e l • You will then be prompted for the Storage resource: A u t o m a t i c a l l y s e l e c t e d C a t a l o g : MyCatalog Using C a t a l o g ” MyCatalog ” The d e f i n e d S t o r a g e r e s o u r c e s a r e : 1 : F i l e 2 : TapeDrive S e l e c t S t o r a g e r e s o u r c e (1 −2) : 2 • Enter the new Volume name: Enter new Volume name : Sunday D e f i n e d P o o l s : 1 : D e f a u l t 2 : S c r a t c h Replace Sunday with the desired label. • Now, select the Pool: S e l e c t t h e Pool (1 −2) : 1 Connecting t o S t o r a g e daemon TapeDrive a t b a c k u p s e r v e r : 9 1 0 3 . . . Sending l a b e l command f o r Volume ” Sunday ” S l o t 0 . . . Congratulations, you have now configured Bacula to backup the localhost to an attached tape drive. Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling