Bacula-users

Re: [Bacula-users] Bacula Restore restoring folders but not files

2015-02-12 13:40:04
Subject: Re: [Bacula-users] Bacula Restore restoring folders but not files
From: Radosław Korzeniewski <radoslaw AT korzeniewski DOT net>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 12 Feb 2015 19:37:40 +0100
Hello,

2015-01-20 14:05 GMT+01:00 RichardDurivage <bacula-forum AT backupcentral DOT com>:
Hello everyone, I am new to the world of Bacula and I have succeeded in setting up my server and some agents on some local windows machines to play around with it. Now I got it to the point where it is successfully completing backups and saving them to the Bacula server. I can view all the files that have been backed up on the server.

Now the issue I am having is when I try to do a restore it says that it has succeeded as per the text output here from the Bacula server -- but it restores Folders only and not the files selected. Any help in tracking down what I have misconfigured would be greatly appreciated!

Peace a cake! :)

cwd is: /
$ cd "C:/Shared"
cwd is: C:/Shared/
$ mark "Win8StartButtonSetup.exe"
1 file marked.
$ done

Great you marked C:/Shared/Win8StartButtonSetup.exe to restore. Please remember the whole filename (with drive and folder name).
 
Where:           c:/Shared

Then you asked Bacula to relocate the file to the c:/Shared drive and folder. As Bacula always restore a file with full filename (remember a drive+folder and filename above?), so a restored full filename will be in your case:

C:/Shared/C:/Shared/Win8StartButtonSetup.exe

So Windows do not allow a colon in the folder or file name, so you are unlucky to get required file restore.
You should use a file relocation feature:

OK to run? (yes/mod/no): mod
Parameters to modify:
     1: Level
     2: Storage
     3: Job
     4: FileSet
     5: Restore Client
     6: When
     7: Priority
     8: Bootstrap
     9: Where
    10: File Relocation
    11: Replace
    12: JobId
    13: Plugin Options
Select parameter to modify (1-13): 10
strip_prefix=*None* add_prefix=*None* add_suffix=*None*
This will replace your current Where value
     1: Strip prefix
     2: Add prefix
     3: Add file suffix
     4: Enter a regexp
     5: Test filename manipulation
     6: Use this ?
Select parameter to modify (1-6): 1
Please enter the path prefix to strip: C:
strip_prefix=C: add_prefix=*None* add_suffix=*None*
This will replace your current Where value
     1: Strip prefix
     2: Add prefix
     3: Add file suffix
     4: Enter a regexp
     5: Test filename manipulation
     6: Use this ?
Select parameter to modify (1-6): 2
Please enter the path prefix to add (/ for none): c:/Shared
strip_prefix=C: add_prefix=c:/Shared add_suffix=*None*
This will replace your current Where value
     1: Strip prefix
     2: Add prefix
     3: Add file suffix
     4: Enter a regexp
     5: Test filename manipulation
     6: Use this ?
Select parameter to modify (1-6): 5
strip_prefix=C: add_prefix=c:/Shared add_suffix=*None* result=!C:!!i,!^!c:/Shared!
Enter a period (.) to stop this test
Please enter filename to test: C:/Shared/Win8StartButtonSetup.exe
C:/Shared/Win8StartButtonSetup.exe -> c:/Shared/Shared/Win8StartButtonSetup.exe
 
I hope it helps.

Best regards

P.S. I was facing this feature in Bacula Enterprise and it was fixed in these release.
--
Radosław Korzeniewski
radoslaw AT korzeniewski DOT net
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] Bacula Restore restoring folders but not files, Radosław Korzeniewski <=