Hi,

Bacula 3.0.3, psql 8.3, debian lenny.

I'm a bit confused about the data bacula want's to restore with Accurate Backup
enabled.


This is what the directory content looks like now.

VUMEM008:/postgres-backups# ls -l
insgesamt 32122316
-rw-r--r-- 1 postgres postgres 5507776709 25. Apr 22:23 all-20100425.sql.gz
drwxr-xr-x 2 postgres postgres       4096 24. Apr 2009  basebackups
drwx------ 2 postgres postgres      16384 24. Sep 2008  lost+found
drwxr-xr-x 5 root     root           4096 26. Jan 2009  mysql-backups
-rw-r--r-- 1 postgres postgres 5432419816 20. Apr 22:37 testdb-20100420.sql.gz
-rw-r--r-- 1 postgres postgres 5449617405 21. Apr 22:11 testdb-20100421.sql.gz
-rw-r--r-- 1 postgres postgres 5470152658 22. Apr 22:14 testdb-20100422.sql.gz
-rw-r--r-- 1 postgres postgres 5494955751 23. Apr 23:17 testdb-20100423.sql.gz
-rw-r--r-- 1 postgres postgres 5506064168 24. Apr 22:50 testdb-20100424.sql.gz
drwx------ 3 postgres postgres      45056  2. Feb 2009  WAL
drwx------ 2 postgres postgres       4096 24. Apr 2009  xlogs


A differential backup was taken monday (this) night.

26-Apr 05:44 VUMEM004-dir JobId 21528: Bacula VUMEM004-dir 3.0.3 (18Oct09): 
26-Apr-2010 05:44:47
  Build OS:               x86_64-pc-linux-gnu debian 5.0.3
  JobId:                  21528
  Job:                    VUMEM008-psql-dumps.2010-04-26_05.30.00_13
  Backup Level:           Differential, since=2010-04-05 05:30:02
  Client:                 "VUMEM008-fd" 3.0.2 (18Jul09) 
i486-pc-linux-gnu,debian,5.0.3
  FileSet:                "VUMEM008-psql-dumps" 2010-01-05 05:30:00
  Pool:                   "VUMEM008-Disk-Differential" (From Job DiffPool 
override)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "VUMEM008-DISK" (From Pool resource)
  Scheduled time:         26-Apr-2010 05:30:00
  Start time:             26-Apr-2010 05:30:02
  End time:               26-Apr-2010 05:44:47
  Elapsed time:           14 mins 45 secs
  Priority:               10
  FD Files Written:       13
  SD Files Written:       13
  FD Bytes Written:       32,860,986,507 (32.86 GB)
  SD Bytes Written:       32,860,987,876 (32.86 GB)
  Rate:                   37131.1 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               yes
  Volume name(s):         
vumem008-diff-0693|vumem008-diff-0657|vumem008-diff-0658|vumem008-diff-0659|vumem008-diff-0660|vumem008-diff-0731|vumem008-diff-0732
  Volume Session Id:      139
  Volume Session Time:    1271767202
  Last Volume Bytes:      4,565,233,235 (4.565 GB)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Backup OK


The amount of data backed up matches the current content of /postgres-backups/.


If I choose restore in bconsole and choose "5: Select the most recent backup
for a client", bacula builds the tree based on the following jobids (latest
full and todays diff):


*restore
[...]
+--------+-------+----------+----------------+---------------------+--------------------+
| jobid  | level | jobfiles | jobbytes       | starttime           | volumename 
        |
+--------+-------+----------+----------------+---------------------+--------------------+
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0698 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0695 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0697 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0694 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0649 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0699 |
| 20,986 | F     |       25 | 27,541,826,745 | 2010-04-05 05:30:02 | 
vumem008-full-0696 |
| 21,528 | D     |       13 | 32,860,986,507 | 2010-04-26 05:30:02 | 
vumem008-diff-0657 |
+--------+-------+----------+----------------+---------------------+--------------------+
You have selected the following JobIds: 20986,21528

Building directory tree for JobId(s) 20986,21528 ...  
24 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.

cwd is: /
$ cd postgres-backups/
cwd is: /postgres-backups/
$ dir
drwx------   3 ntp      ssl-cert     45056  2009-02-02 10:13:00  
/postgres-backups/WAL/
----------   0 root     root             0  2010-04-04 22:00:59  
/postgres-backups/all-20100404.sql.gz
-rw-r--r--   1 ntp      ssl-cert5507776709  2010-04-25 22:23:00  
/postgres-backups/all-20100425.sql.gz
drwxr-xr-x   2 ntp      ssl-cert      4096  2009-04-24 14:47:07  
/postgres-backups/basebackups/
drwx------   2 ntp      ssl-cert     16384  2008-09-24 17:34:49  
/postgres-backups/lost+found/
drwxr-xr-x   5 root     root          4096  2009-01-26 16:34:21  
/postgres-backups/mysql-backups/
----------   0 root     root             0  2010-03-30 21:42:52  
/postgres-backups/testdb-20100330.sql.gz
----------   0 root     root             0  2010-03-31 21:52:07  
/postgres-backups/testdb-20100331.sql.gz
----------   0 root     root             0  2010-04-01 19:15:20  
/postgres-backups/testdb-20100401.sql.gz
----------   0 root     root             0  2010-04-02 21:42:42  
/postgres-backups/testdb-20100402.sql.gz
----------   0 root     root             0  2010-04-03 21:43:22  
/postgres-backups/testdb-20100403.sql.gz
-rw-r--r--   1 ntp      ssl-cert5432419816  2010-04-20 22:37:04  
/postgres-backups/testdb-20100420.sql.gz
-rw-r--r--   1 ntp      ssl-cert5449617405  2010-04-21 22:11:50  
/postgres-backups/testdb-20100421.sql.gz
-rw-r--r--   1 ntp      ssl-cert5470152658  2010-04-22 22:14:48  
/postgres-backups/testdb-20100422.sql.gz
-rw-r--r--   1 ntp      ssl-cert5494955751  2010-04-23 23:17:08  
/postgres-backups/testdb-20100423.sql.gz
-rw-r--r--   1 ntp      ssl-cert5506064168  2010-04-24 22:50:19  
/postgres-backups/testdb-20100424.sql.gz
drwx------   2 ntp      ssl-cert      4096  2009-04-24 14:46:46  
/postgres-backups/xlogs/


Bacula shows me a lot more than what should be restored. There are many files
that have been deleted weeks ago. The owner and group names are also a bit
strange.


For example testdb-20100330.sql.gz was deletet in the first week of april. A
query for the file name shows that bacula thinks that testdb-20100330.sql.gz
was also backed up with todays differential backup (jobid 21528):


Enter Filename (no path): testdb-20100330.sql.gz
+--------+-------------+--------------------+------------------------+---------------------+-------+----------+----------------+
| jobid  | client      | path               | name                   | 
starttime           | level | jobfiles | jobbytes       |
+--------+-------------+--------------------+------------------------+---------------------+-------+----------+----------------+
| 20,986 | VUMEM008-fd | /postgres-backups/ | testdb-20100330.sql.gz | 
2010-04-05 05:30:02 | F     |       25 | 27,541,826,745 |
| 21,169 | VUMEM008-fd | /postgres-backups/ | testdb-20100330.sql.gz | 
2010-04-12 05:30:03 | D     |       13 | 33,507,178,492 |
| 21,345 | VUMEM008-fd | /postgres-backups/ | testdb-20100330.sql.gz | 
2010-04-19 05:30:03 | D     |       13 | 32,255,085,558 |
| 21,528 | VUMEM008-fd | /postgres-backups/ | testdb-20100330.sql.gz | 
2010-04-26 05:30:02 | D     |       13 | 32,860,986,507 |
+--------+-------------+--------------------+------------------------+---------------------+-------+----------+----------------+


This was not the case, but still bacula shows that it thinks it had backed up
the file with job 21528.

*list files jobid=21528
+------------------------------------------+
| filename                                 |
+------------------------------------------+
| /postgres-backups/testdb-20100422.sql.gz |
| /postgres-backups/testdb-20100423.sql.gz |
| /postgres-backups/testdb-20100420.sql.gz |
| /postgres-backups/                       |
| /postgres-backups/testdb-20100402.sql.gz |
| /postgres-backups/testdb-20100401.sql.gz |
| /postgres-backups/testdb-20100330.sql.gz |
| /postgres-backups/testdb-20100403.sql.gz |
| /postgres-backups/testdb-20100421.sql.gz |
| /postgres-backups/testdb-20100424.sql.gz |
| /postgres-backups/all-20100425.sql.gz    |
| /postgres-backups/testdb-20100331.sql.gz |
| /postgres-backups/all-20100404.sql.gz    |
+------------------------------------------+


If I try to restore file testdb-20100331.sql.gz from jobid 21528, bacula fails.
This doesn't suprise me, because I know that testdb-20100331.sql.gz could not
have been backed up in job 21528, it was deleted weeks ago.

*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 JobId
    13: Cancel
Select item:  (1-13): 3
Enter JobId(s), comma separated, to restore:21528
You have selected the following JobId: 21528

Building directory tree for JobId(s) 21528 ...  
12 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.

cwd is: /
$ cd postgres-backups/
cwd is: /postgres-backups/
$ dir
----------   0 root     root             0  2010-04-04 22:00:59  
/postgres-backups/all-20100404.sql.gz
-rw-r--r--   1 ntp      ssl-cert5507776709  2010-04-25 22:23:00  
/postgres-backups/all-20100425.sql.gz
----------   0 root     root             0  2010-03-30 21:42:52  
/postgres-backups/testdb-20100330.sql.gz
----------   0 root     root             0  2010-03-31 21:52:07  
/postgres-backups/testdb-20100331.sql.gz
----------   0 root     root             0  2010-04-01 19:15:20  
/postgres-backups/testdb-20100401.sql.gz
----------   0 root     root             0  2010-04-02 21:42:42  
/postgres-backups/testdb-20100402.sql.gz
----------   0 root     root             0  2010-04-03 21:43:22  
/postgres-backups/testdb-20100403.sql.gz
-rw-r--r--   1 ntp      ssl-cert5432419816  2010-04-20 22:37:04  
/postgres-backups/testdb-20100420.sql.gz
-rw-r--r--   1 ntp      ssl-cert5449617405  2010-04-21 22:11:50  
/postgres-backups/testdb-20100421.sql.gz
-rw-r--r--   1 ntp      ssl-cert5470152658  2010-04-22 22:14:48  
/postgres-backups/testdb-20100422.sql.gz
-rw-r--r--   1 ntp      ssl-cert5494955751  2010-04-23 23:17:08  
/postgres-backups/testdb-20100423.sql.gz
-rw-r--r--   1 ntp      ssl-cert5506064168  2010-04-24 22:50:19  
/postgres-backups/testdb-20100424.sql.gz
$ mark testdb-20100331.sql.gz
1 file marked.
$ done
No files selected to be restored.



I'm highly confused about the information bacula shows in the tree view and the
information that bacula has about what files where part of the differential
backup. This can't be correct.


Ralf

------------------------------------------------------------------------------
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to