Hello,
On Thu, 2009-05-14 at 18:24 +0200, Kern Sibbald wrote:
> Hello,
>
> On Thursday 14 May 2009 17:23:50 Ulrich Leodolter wrote:
> > Hello,
> >
> > When doing restore file selection by
> > 7: Enter a list of files to restore
> > Copy Job may be selected.
> >
> > This is inconsistent with other restore job selections.
> > It's not a real bug, but i don't like to restore from
> > Copy on Tape until full Backup is on File storage.
>
> Yes, I agree, this is not very consistent.
>
> >
> > I am not sure, but think sql_cmds.c:uar_jobid_fileindex
> > should contain a job type restriction like
> >
> > " AND JobStatus IN ('T','W') AND Type='B'"
>
> Yes, that sounds reasonable to me. I've added it to the source code, but I
> think it will need a good amount of testing before we can release it.
>
> Do you have any results after testing it?
Yes, details see attached files.
I did the restore by running
bconsole < restore-galileo-fd-bconsole-cmd
/var/www/html/bacula/tmp/restore-list just contains one file:
/etc/bacula/bacula-fd.conf
galileo-fd.log.RestoreTapeCopy contains output without patch
galileo-fd.log.RestoreFromFile output after patching sql_cmds.c today
Here is my patch
--- sql_cmds.c.r8508 2009-03-07 21:59:46.000000000 +0100
+++ sql_cmds.c 2009-05-15 09:04:50.000000000 +0200
@@ -392,6 +392,7 @@
const char *uar_jobid_fileindex =
"SELECT Job.JobId,File.FileIndex FROM Job,File,Path,Filename,Client "
"WHERE Job.JobId=File.JobId "
+ "AND Job.JobStatus IN ('T','W') AND Job.Type='B' "
"AND Job.StartTime<='%s' "
"AND Path.Path='%s' "
"AND Filename.Name='%s' "
Regards
Ulrich
--
Ulrich Leodolter <ulrich.leodol...@obvsg.at>
Oesterreichische Bibliothekenverbund und Service GmbH
Bruennlbadgasse 17/2A, A-1090 Wien
Fax +43 1 4035158-30
Tel +43 1 4035158-21
Web http://www.obvsg.at
@output /tmp/galileo-fd.log
restore where=/var/www/html/bacula/galileo-fd client=galileo-fd
restoreclient=troll-fd storage=File
7
</var/www/html/bacula/tmp/restore-list
2
yes
wait
messages
@output
quit
restore where=/var/www/html/bacula/galileo-fd client=galileo-fd
restoreclient=troll-fd storage=File
Using Catalog "MyCatalog"
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: Cancel
Select item: (1-12): 7
Enter file names with paths, or < to enter a filename
containing a list of file names with paths, and terminate
them with a blank line.
Enter full filename: </var/www/html/bacula/tmp/restore-list
Enter full filename:
Bootstrap records written to /opt/bacula/working/troll-dir.restore.1.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
Backup-0629 File FileStorage
1 file selected to be restored.
The defined Restore Job resources are:
1: RestoreFiles
2: RestoreLinux
3: RestoreWin
4: RestoreMac
Select Restore Job (1-4): 2
Run Restore job
JobName: RestoreLinux
Bootstrap: /opt/bacula/working/troll-dir.restore.1.bsr
Where: /var/www/html/bacula/galileo-fd
Replace: always
FileSet: LinuxLocalPartitions
Backup Client: galileo-fd
Restore Client: troll-fd
Storage: File
When: 2009-05-15 09:17:36
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): yes
Job queued. JobId=23863
wait
You have messages.
messages
15-May 09:17 troll-dir JobId 23863: Start Restore Job
RestoreLinux.2009-05-15_09.17.36_05
15-May 09:17 troll-dir JobId 23863: Using Device "FileStorage"
15-May 09:17 troll-sd JobId 23863: Ready to read from volume "Backup-0629" on
device "FileStorage" (/disk0/bacula/files).
15-May 09:17 troll-sd JobId 23863: Forward spacing Volume "Backup-0629" to
file:block 7:933320371.
15-May 09:17 troll-sd JobId 23863: End of Volume at file 7 on device
"FileStorage" (/disk0/bacula/files), Volume "Backup-0629"
15-May 09:17 troll-sd JobId 23863: End of all volumes.
15-May 09:17 troll-dir JobId 23863: Bacula troll-dir 3.0.1 (30Apr09):
15-May-2009 09:17:40
Build OS: i686-pc-linux-gnu redhat Enterprise release
JobId: 23863
Job: RestoreLinux.2009-05-15_09.17.36_05
Restore Client: troll-fd
Start time: 15-May-2009 09:17:38
End time: 15-May-2009 09:17:40
Files Expected: 1
Files Restored: 1
Bytes Restored: 927
Rate: 0.5 KB/s
FD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Restore OK
15-May 09:17 troll-dir JobId 23863: Begin pruning Jobs.
15-May 09:17 troll-dir JobId 23863: No Jobs found to prune.
15-May 09:17 troll-dir JobId 23863: Begin pruning Files.
15-May 09:17 troll-dir JobId 23863: No Files found to prune.
15-May 09:17 troll-dir JobId 23863: End auto prune.
@output
restore where=/var/www/html/bacula/galileo-fd client=galileo-fd
restoreclient=troll-fd storage=File
Using Catalog "MyCatalog"
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: Cancel
Select item: (1-12): 7
Enter file names with paths, or < to enter a filename
containing a list of file names with paths, and terminate
them with a blank line.
Enter full filename: </var/www/html/bacula/tmp/restore-list
Enter full filename:
Warning default storage overridden by "File" on command line.
Bootstrap records written to /opt/bacula/working/troll-dir.restore.79.bsr
The job will require the following
Volume(s) Storage(s) SD Device(s)
===========================================================================
BACU.009 Tape OVERLAND
1 file selected to be restored.
The defined Restore Job resources are:
1: RestoreFiles
2: RestoreLinux
3: RestoreWin
4: RestoreMac
Select Restore Job (1-4): 2
Run Restore job
JobName: RestoreLinux
Bootstrap: /opt/bacula/working/troll-dir.restore.79.bsr
Where: /var/www/html/bacula/galileo-fd
Replace: always
FileSet: LinuxLocalPartitions
Backup Client: galileo-fd
Restore Client: troll-fd
Storage: File
When: 2009-05-14 16:33:12
Catalog: MyCatalog
Priority: 10
Plugin Options: *None*
OK to run? (yes/mod/no): yes
Job queued. JobId=23744
wait
You have messages.
messages
14-May 16:33 troll-dir JobId 23744: Start Restore Job
RestoreLinux.2009-05-14_16.33.12_53
14-May 16:33 troll-dir JobId 23744: Using Device "FileStorage"
14-May 16:33 troll-sd JobId 23744: acquire.c:116 Changing read device. Want
Media Type="LTO-4" have="File"
device="FileStorage" (/disk0/bacula/files)
14-May 16:33 troll-sd JobId 23744: Media Type change. New read device
"Drive-1" (/dev/nst0) chosen.
14-May 16:34 troll-sd JobId 23744: Ready to read from volume "BACU.009" on
device "Drive-1" (/dev/nst0).
14-May 16:34 troll-sd JobId 23744: Forward spacing Volume "BACU.009" to
file:block 246:0.
14-May 16:36 troll-sd JobId 23744: End of Volume at file 246 on device
"Drive-1" (/dev/nst0), Volume "BACU.009"
14-May 16:36 troll-sd JobId 23744: End of all volumes.
14-May 16:36 troll-sd JobId 23744: Alert: smartctl version 5.38
[i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
14-May 16:36 troll-sd JobId 23744: Alert: Home page is
http://smartmontools.sourceforge.net/
14-May 16:36 troll-sd JobId 23744: Alert:
14-May 16:36 troll-sd JobId 23744: Alert: TapeAlert: OK
14-May 16:36 troll-sd JobId 23744: Alert:
14-May 16:36 troll-sd JobId 23744: Alert: Error counter log:
14-May 16:36 troll-sd JobId 23744: Alert: Errors Corrected by
Total Correction Gigabytes Total
14-May 16:36 troll-sd JobId 23744: Alert: ECC rereads/
errors algorithm processed uncorrected
14-May 16:36 troll-sd JobId 23744: Alert: fast | delayed rewrites
corrected invocations [10^9 bytes] errors
14-May 16:36 troll-sd JobId 23744: Alert: read: 233 0 0
0 233 0.000 0
14-May 16:36 troll-sd JobId 23744: Alert: write: 25828 0 0
0 57091 0.000 0
14-May 16:36 troll-dir JobId 23744: Bacula troll-dir 3.0.1 (30Apr09):
14-May-2009 16:36:09
Build OS: i686-pc-linux-gnu redhat Enterprise release
JobId: 23744
Job: RestoreLinux.2009-05-14_16.33.12_53
Restore Client: troll-fd
Start time: 14-May-2009 16:33:14
End time: 14-May-2009 16:36:09
Files Expected: 1
Files Restored: 1
Bytes Restored: 927
Rate: 0.0 KB/s
FD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Restore OK
14-May 16:36 troll-dir JobId 23744: Begin pruning Jobs.
14-May 16:36 troll-dir JobId 23744: No Jobs found to prune.
14-May 16:36 troll-dir JobId 23744: Begin pruning Files.
14-May 16:36 troll-dir JobId 23744: No Files found to prune.
14-May 16:36 troll-dir JobId 23744: End auto prune.
@output
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel