Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Bacula console. Exemple d’ús

bacula

bacula

Bacula és un programari gestor de còpies de seguretat en xarxa que admet clients heterogenis.

El programa de consola, bconsole, permet gestionar les còpies, executar-les, restaura-les, verificar que s’han executat etc…

A continuació es mostren alguns exemples d’ús.

Per obrir la consola

$sudo /usr/local/bacula/bin/bconsole

Ajuda

*help

Ajuda d’una comanda

*help <comanda>

Executar un job.

Els jobs estan definits al fitxer bacula-dir.conf

*run
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
1: Backup localhost
2: Backup server arxius 192.168.110.100
3: Backup Direccio 192.168.110.31 Desktop and Documents
...
41: Backup Idiomes2 192.168.110.36 Desktop and Documents
42: Backup consergeria 192.168.110.20 Desktop and Documents
43: Backup consergeria 192.168.110.20 Data
44: Backup Catalog localhost
45: RestoreFiles
Select Job resource (1-45): 27

S’indica el job entre els disponibles, per exemple el 27

Run Backup job
JobName: Backup Mates2 192.168.110.10 Desktop and Documents
Level: Incremental
Client: s-216-fd
FileSet: Windows Escriptori i Documents E
Pool: File (From Job resource)
Storage: File (From Job resource)
When: 2010-03-08 14:41:00
Priority: 10
OK to run? (yes/mod/no): yes

Abans d’executar-lo es poden fer modificacions (indicant “mod”), a l’exemple s’executa directament (indicant “yes”)

Job queued. JobId=312
You have messages.

El job s’encua per executar-se, el sistema avisa que hi ha missatges nous. Cal comprovar-los per veure si tot va bé

Comprovar els missatges

Els missatges informen del resultat dels jobs
*m
08-mar 14:41 super-nagios-dir JobId 312: No prior Full backup Job record found.
08-mar 14:41 super-nagios-dir JobId 312: No prior or suitable Full backup found in catalog. Doing FULL backup.
08-mar 14:41 super-nagios-dir JobId 312: Start Backup JobId 312, Job=Backup_Mates2_192.168.110.10_Desktop_and_Documents.2010-03-08_14.41.57_22
08-mar 14:41 super-nagios-dir JobId 312: Using Device "FileStorage"

Restaurar fitxers

*restore
First you select one or more JobIds that contain files
to be restored. You will be presented several methods
of specifying the JobIds. Then you will be allowed to
select which files from those JobIds are to be restored.

To select the JobIds, you have the following choices:
1: List last 20 Jobs run
2: List Jobs where a given File is saved
3: Enter list of comma separated JobIds to select
4: Enter SQL list command
5: Select the most recent backup for a client
6: Select backup for a client before a specified time
7: Enter a list of files to restore
8: Enter a list of files to restore before a specified time
9: Find the JobIds of the most recent backup for a client
10: Find the JobIds for a backup for a client before a specified time
11: Enter a list of directories to restore for found JobIds
12: Select full restore to a specified Job date
13: Cancel
Select item: (1-13): 3

Hi ha vàries opcions disponibles, si coneixem els identificadors dels jobs (backup’s) que volem restaurar, podem fer servir la opció 3

Enter JobId(s), comma separated, to restore: 311
You have selected the following JobId: 311

En aquest cas indiquem el job 311

Building directory tree for JobId(s) 311 ... ++++++++++++++++++++++++++++++++++++++++++++++
3,041 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.

El sistema mostra l’estructura de fitxers del job (backup). Es poden escollir uns fitxers concrets navegant (comandes de shell ls, cd…) o per exemple escollir-los tots “add *”

cwd is: /
$ ls
C:/
$ cd C:/
cwd is: C:/
$ ls
ADMINISTRACIO/
ALEX/
$ add *
3,212 files marked.
$ done

Indicant “done” es restauren els fitxers seleccionats, amb “quit” no es restaura res

Comprovar estat d’un client

*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3

Escollir que es vol veure l’estat d’un client, opció 3

The defined Client resources are:
1: super-nagios-fd
2: www-fd
3: consergeria
4: direccio
5: secretaria_1
6: secretaria_3
7: secretaria_4
8: secretaria_adm
9: secretaria_secre
10: coord_1
11: coord_2
12: cap_estudis_1-fd
13: cap_estudis_2-fd
14: s-215-fd
15: s-216-fd
16: llengua1-fd
17: llengua2-fd
18: socials-fd
19: depcexp-fd
20: pcbiblioteca-fd
21: depidiom1
22: depidiom2-fd
23: depvisual
Select Client (File daemon) resource (1-23): 3

S’indica el client entre els disponibles, per exemple el 3: consergeria

Connecting to Client consergeria at 192.168.110.20:9102
consergeria Version: 5.0.0 (24 January 2010) VSS Linux Cross-compile Win32
Daemon started 07-Mar-10 18:28, 2 Jobs run since started.
Heap: heap=0 smbytes=124,803 max_bytes=280,751 bufs=87 max_bufs=243
Sizeof: boffset_t=8 size_t=4 debug=0 trace=1

Running Jobs:
Director connected at: 08-Mar-10 14:47
No Jobs running.
====

Terminated Jobs:
JobId Level Files Bytes Status Finished Name
======================================================================
297 Incr 38 9.846 M OK 08-Mar-10 10:53 Backup_consergeria_192.168.110.20_Desktop_and_Documents
298 Incr 5 5.129 K OK 08-Mar-10 10:54 Backup_consergeria_192.168.110.20_Data
====

Comprovar els jobs executats

*list jobs

 +-------+------------------------------------------------------------+---------------------+------+-------+----------+----------------+-----------+
 | JobId | Name                                                       | StartTime           | Type | Level | JobFiles | JobBytes       | JobStatus |
 +-------+------------------------------------------------------------+---------------------+------+-------+----------+----------------+-----------+
 |     1 | Backup server arxius 192.168.110.100                       | 2010-02-19 15:48:50 | B    | F     |      654 |  4,687,523,669 | T         |
 |     3 | Backup consergeria 192.168.110.20 Desktop and Documents    | 2010-02-19 16:17:23 | B    | F     |    1,901 |    130,005,209 | T         |
 |     4 | Backup localhost                                           | 2010-02-22 10:00:02 | B    | F     |       50 |      9,737,327 | T         |
 |     5 | Backup server arxius 192.168.110.100                       | 2010-02-22 10:00:08 | B    | I     |        0 |              0 | T         |
 |     6 | Backup Mates1 192.168.110.18 Desktop and Documents         | 2010-02-22 10:00:27 | B    | F     |   15,214 |  2,787,811,322 | T         |
 |     7 | Backup Mates1 192.168.110.18 Data                          | 2010-02-22 10:09:17 | B    | F     |      552 |     43,318,814 | T         |

Mostrar els fitxers d’un job

*list file jobid=311
...
| C:/Loweuro/Rebuts/Curs 09-10/DD291109.371.pdf                                                        |
| C:/Loweuro/Rebuts/Curs 09-10/DD291209.283.pdf                                                        |
| C:/Loweuro/Rebuts/Curs 09-10/DD301009.689.pdf                                                        |
| C:/Loweuro/Rebuts/Curs 09-10/DD310110.966.pdf                                                        |
| C:/Loweuro/Rebuts/                                                                                   |
| C:/Loweuro/                                                                                          |
+----------------------------------------------------------------------------------------------------+
+-------+-------------------------------------------------+---------------------+------+-------+----------+-------------+-----------+
| JobId | Name                                            | StartTime           | Type | Level | JobFiles | JobBytes    | JobStatus |
+-------+-------------------------------------------------+---------------------+------+-------+----------+-------------+-----------+
|   311 | Backup Dades Administradora 192.168.110.24 Data | 2010-03-08 14:16:46 | B    | F     |    3,212 | 528,781,150 | T         |
+-------+-------------------------------------------------+---------------------+------+-------+----------+-------------+-----------+

1 comment to Bacula console. Exemple d’ús

  • Per reiniciar el sistema,

    a la carpeta d’instal·lació (/usr/local/bacula/bin) es troben els següents scripts, cal executar-los en el següent ordre

    ./drop_bacula_tables -u bacula -p
    ./make_bacula_tables -u bacula -p

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>