On Monday 12 June 2006 13:09, David Rodriguez Demelos wrote:
> I'm a new bacula user and I have a little problem with client console.
> I have configured the client console restrictions in bacula-dir.conf like
> this:
>
> ...
>
> Console {
>   Name = "Client Name"
>   Password = ""
>   JobACL = "Job Client Name", RestoreFiles-Linux
>   ClientACL = client-fd
>   StorageACL = "My Storage"
>   ScheduleACL = *all*
>   PoolACL = *all*
>   FileSetACL = Linux
>   CatalogACL = MyCatalog
>   CommandACL = run, q, quit, restore, status
> }
>
> ...
>
> With this configuration I want the client console only can use its jobs.
> When I execute run jobs from client it work ok, but when I execute a
> restore job from client with bconsole program and select the option number
> 3 (Enter list of comma separated JobIds to select), I can select a other
> client job. Bacula launch a error message (bacula can not use this job),
> but the restore process continue and finally it restore this backup in the
> first client computer. This is very dangeraous, because any client can get
> another client data.

Bacula should not allow the user to use JobIds from another client, so this
sounds like a bug.  However, you will need to provide me with specific
output
showing this problem as well as a bit of information about your setup.  
Please see the "Support Page" of the Bacula web site.  In particular without
knowing what Bacula version you are using, I cannot even start ...

> How I can configure this for to solve this problem?
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/Client-console-restrictions-t1773302.html#a4826704
> Sent from the Bacula - Users forum at Nabble.com.
>
>
>
> _______________________________________________
> Bacula-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Best regards,

Kern

  (">
  /\
  V_V 









Hi, tanks Kern for your attention.
My bacula server version is 1.38.9 and it is installed in Red Hat EL4. I
have a windows 2003 client (Davidov) and Red Hat EL4 client (brandy2) with
version 1.38.9 too. Furthermore I have two Debian clients (Corleone and LIA)
with version 1.36.3. I have the problem in all my clients.

I have configured my "bacula-dir.conf" file like this:


#
# Default Bacula Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bacula release 1.38.9 (02 May 2006) -- redhat Enterprise 3.0
#
#  You might also want to change the default email address
#   from root to your address.  See the "mail" and "operator"
#   directives in the Messages resource.
#
#
############################  Director  ##################################

Director {                            # define myself
  Name = bacula-dir
  Description = "Director de Bacula"
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/query.sql"
  WorkingDirectory = "/var/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 20
  Password = ""         # Console password
  Messages = Standard
}



############################  JobDefs  ##################################

JobDefs {
  Name = "Default"
  Type = Backup
  Level = Full 
  Schedule = "Setmanal"
  Storage = FDA
  Messages = Standard
  Full Backup Pool = Full
  Pool = Full
  Priority = 10
  Maximum Concurrent Jobs = 20
}



###########################  Jobs  ####################################

##############
# Bacula Job #
##############

Job {
  Name = "Bacula"
  Client = bacula-fd
  JobDefs = "Default"
  FileSet = "Linux"
  Write Bootstrap = "/var/bacula/Bacula.bsr"
}



###############
# Brandy2 Job #
###############

Job {
  Name = "Brandy2"
  Client = brandy2-fd
  JobDefs = "Default"
  FileSet = "Linux"
  Write Bootstrap = "/var/bacula/Brandy2.bsr"
}



################
# Corleone Job #
################

Job {
  Name = "Corleone"
  Client = corleone-fd
  JobDefs = "Default"
  FileSet = "Linux"
  Write Bootstrap = "/var/bacula/Corleone.bsr"
}



###########
# LIA Job #
###########

Job {
  Name = "LIA"
  Client = LIA-fd
  JobDefs = "Default"
  FileSet = "Linux"
  Write Bootstrap = "/var/bacula/LIA.bsr"
}



###############
# Davidov Job #
###############

Job {
  Name = "Davidov"
  Client = davidov-fd
  JobDefs = "Default"
  FileSet = "Windows"
  Write Bootstrap = "/var/bacula/Davidov.bsr"
}



#####################
# BackupCatalog Job #
#####################

Job {
  Name = "BackupCatalog"
  Type = Backup
  JobDefs = "Default"
  Level = Full
  Client = bacula-fd
  FileSet="Catalog"
  Schedule = "Setmanal-Despres-Backup"
  Storage = FDA
  Messages = Standard
  Pool = Full
  # This creates an ASCII copy of the catalog
  RunBeforeJob = "/etc/bacula/make_catalog_backup bacula bacula"
  # This deletes the copy of the catalog
  RunAfterJob  = "/etc/bacula/delete_catalog_backup"
  Write Bootstrap = "/var/bacula/BackupCatalog.bsr"
  Priority = 11                   # run after main backup
  Maximum Concurrent Jobs = 20
}



##########################
# RestoreFiles-Linux Job #
##########################

Job {
  Name = "RestoreFiles-Linux"
  Type = Restore
  Client=bacula-fd                 
  FileSet="Linux"                  
  Storage = FDA                      
  Pool = Full
  Messages = Standard
  Where = /tmp/bacula-restores
  Maximum Concurrent Jobs = 20
}



############################
# RestoreFiles-Windows Job #
############################

Job {
  Name = "RestoreFiles-Windows"
  Type = Restore
  Client=davidov-fd                 
  FileSet="Windows"                  
  Storage = FDA                      
  Pool = Full
  Messages = Standard
  Where = "D:/bacula-restores"
  Maximum Concurrent Jobs = 20
}



######################### FileSets ##################################

#################
# Linux FileSet #
#################

# List of files to be backed up
FileSet {
  Name = "Linux"
  Include {
    Options {
      signature = MD5;
      compression = GZIP;
      onefs = no;
    }
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /home/david.rodriguez-dem/Grups
    File = /home/david.rodriguez-dem/Documents
    File = /home/noelia.catala/Grups
    File = /home/noelia.catala/Documents
    File = /backupsFDA
    File = /.journal
    File = /.fsck
  }
}



###################
# Windows FileSet #
###################

FileSet {
  Name = "Windows"
  Enable VSS = yes
  Include {
    Options {
       signature = MD5;
       compression=GZIP;
     }
     File = "C:/"
     File = "D:/"
  }
  Exclude {
    File = "*.obj"
    File = "*.exe"
  }
}



###################
# Catalog FileSet #
###################

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5;
      compression=GZIP;
    }
    File = /var/bacula/bacula.sql
  }
}



######################### Schedules ##################################

#####################
# Setmanal Schedule #
#####################

Schedule {
  Name = "Setmanal"
  Run = Level=Differential Pool=D1 mon at 21:00
  Run = Level=Differential Pool=D2 tue at 21:00
  Run = Level=Differential Pool=D1 wed at 21:00
  Run = Level=Differential Pool=D2 thu at 21:00
  Run = Level=Differential Pool=D1 fri at 21:00
  Run = Level=Full Pool=Full sat at 21:00
}



####################################
# Setmanal-Despres-Backup Schedule #
####################################

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "Setmanal-Despres-Backup"
  Run = Level=Full sun-sat at 0:10
}




######################### Clients ##################################

####################
# Bacula-fd Client #
####################

Client {
  Name = bacula-fd
  #Address = localhost
  Address = "bacula client adress" 
  FDPort = 9102
  Catalog = MyCatalog
  Password = ""          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}



#####################
# Brandy2-fd Client #
#####################

Client {
  Name = brandy2-fd
  #Address = localhost
  Address = "brandy2 client adress"
  FDPort = 9102
  Catalog = MyCatalog
  Password = ""          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}



######################
# Corleone-fd Client #
######################

Client {
  Name = corleone-fd
  #Address = localhost
  Address = "corleone client adress"
  FDPort = 9102
  Catalog = MyCatalog
  Password = ""          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}



#################
# LIA-fd Client #
#################

Client {
  Name = LIA-fd
  #Address = localhost
  Address = "LIA client adress"
  FDPort = 9102
  Catalog = MyCatalog
  Password = ""          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}



#####################
# Davidov-fd Client #
#####################

Client {
  Name = davidov-fd
  #Address = localhost                
  Address = "davidov client adress"
  FDPort = 9102
  Catalog = MyCatalog
  Password = ""         # password for FileDaemon 2
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
  Maximum Concurrent Jobs = 20
}



######################### Storages ##################################

#######
# FDA #
#######

# Definition of file storage device
Storage {
  Name = FDA
# Do not use "localhost" here    
  #Address = localhost
  Address = "bacula storage adress"                # N.B. Use a fully
qualified name here
  SDPort = 9103
  Password = ""
  Device = FDA
  Media Type = File
  Maximum Concurrent Jobs = 20
}



######################### Catalog ##################################

# Generic catalog service
Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = ""
}



######################### Messages ##################################

####################
# Standard Message #
####################

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#  to replace the %r in the from field (-f part) with a single valid
#  email address in both the mailcommand and the operatorcommand.
#
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula: Intervention needed for %j\" %r"
  mail = [EMAIL PROTECTED] = all, !skipped            
  operator = [EMAIL PROTECTED] = mount
  console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/bacula/log" = all, !skipped
}



##################
# Daemon Message #
##################

#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula daemon message\" %r"
  mail = [EMAIL PROTECTED] = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/bacula/log" = all, !skipped
}



########################## Pools ###################################

#############
# Full Pool #
#############
    
# Default pool definition
Pool {
  Name = Full
  Pool Type = Backup
  LabelFormat = "F-"
  Recycle = yes                       # Bacula can automatically recycle
Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 15 days
  Maximum Volume Bytes = 42949672960  # solament ho utilitzarem per backup a
disc 
  Accept Any Volume = yes             # write on any volume in the pool
}



###########
# D1 Pool #
###########

Pool {
  Name = D1
  Pool Type = Backup
  LabelFormat = "D1-"
  Recycle = yes                       # Bacula can automatically recycle
Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 15 days
  Maximum Volume Bytes = 42949672960  # solament ho utilitzarem per backup a
disc 
  Accept Any Volume = yes             # write on any volume in the pool
}



###########
# D2 Pool #
###########

Pool {
  Name = D2
  Pool Type = Backup
  LabelFormat = "D2-"
  Recycle = yes                       # Bacula can automatically recycle
Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 15 days
  Maximum Volume Bytes = 42949672960  # solament ho utilitzarem per backup a
disc 
  Accept Any Volume = yes             # write on any volume in the pool
}



########################## Consoles ###################################

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = bacula-mon
  Password = ""
  CommandACL = status, .status
}



####################
# Brandy2 Console #
####################

Console {
  Name = Brandy2-con
  Password = ""
  JobACL = Brandy2, RestoreFiles-Linux
  ClientACL = brandy2-fd
  StorageACL = FDA
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = Linux
  CatalogACL = MyCatalog
  CommandACL = run, q, quit, restore, status
}


####################
# Corleone Console #
####################

Console {
  Name = Corleone-con
  Password = ""
  JobACL = Corleone, RestoreFiles-Linux
  ClientACL = corleone-fd
  StorageACL = FDA
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = Linux
  CatalogACL = MyCatalog
  CommandACL = run, q, quit, restore, status
}



###############
# Lia Console #
###############

Console {
  Name = LIA-con
  Password = ""
  JobACL = LIA, RestoreFiles-Linux
  ClientACL = LIA-fd
  StorageACL = FDA
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = Linux
  CatalogACL = MyCatalog
  CommandACL = run, q, quit, restore, status
}



###################
# Davidov Console #
###################

Console {
  Name = Davidov-con
  Password = ""
  JobACL = Davidov, RestoreFiles-Windows
  ClientACL = davidov-fd
  StorageACL = FDA
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = Windows
  CatalogACL = MyCatalog
  CommandACL = run, q, quit, restore, status
}







And "bconsole.conf" file in client brandy2 like this (the rest of my clients
bconsole configuration is like this too):


#
# Bacula User Agent (or Console) Configuration File
#

Director {
  Name = bacula-dir
  DIRport = 9101
  address = "bacula director adress"
  Password = ""
}

Console {
  Name = Brandy2-con
  Password = ""
}





And I have executed the following restore job in Brandy2 client (Restore
Corleone client  "/home/david.rodriguez-dem/Firefox_wallpaper.png" file in
Brandy2 client):


[EMAIL PROTECTED] bacula]# bconsole
Connecting to Director bacula.upc.es:9101
1000 OK: bacula-dir Version: 1.38.9 (02 May 2006)
Enter a period to cancel a command.
*restore
Using default Catalog name=MyCatalog DB=bacula

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): 1
+-------+-------------+---------------------+----------+----------+---------------+
| JobId | Client      | StartTime           | JobLevel | JobFiles | JobBytes  
|
+-------+-------------+---------------------+----------+----------+---------------+
| 16    | bacula-fd   | 2006-06-13 00:10:11 | F        | 1        | 32084438  
|
| 15    | davidov-fd  | 2006-06-12 22:01:14 | F        | 10260    |
1583295988   |
| 14    | LIA-fd      | 2006-06-12 21:41:43 | F        | 157499   |
4330753346   |
| 13    | corleone-fd | 2006-06-12 21:33:31 | F        | 122863   |
1669772971   |
| 12    | brandy2-fd  | 2006-06-12 21:32:40 | F        | 2193     |
470080452   |
| 11    | bacula-fd   | 2006-06-12 21:21:30 | F        | 193444   |
1302286121   |
| 10    | davidov-fd  | 2006-06-12 21:00:10 | D        | 8        | 811386  
|
| 8     | corleone-fd | 2006-06-12 21:00:07 | D        | 4667     | 144728  
|
| 9     | LIA-fd      | 2006-06-12 21:00:07 | D        | 4593     | 538280  
|
| 7     | brandy2-fd  | 2006-06-12 21:00:04 | D        | 0        | 0   |
| 6     | bacula-fd   | 2006-06-12 21:00:03 | D        | 2085     | 29486069  
|
| 5     | davidov-fd  | 2006-06-12 19:35:43 | F        | 10260    |
1444056696   |
| 4     | LIA-fd      | 2006-06-12 19:35:31 | F        | 157499   |
4330754123   |
| 3     | corleone-fd | 2006-06-12 19:35:25 | F        | 122863   |
1669771575   |
| 2     | brandy2-fd  | 2006-06-12 19:35:18 | F        | 2193     |
470080452   |
| 1     | bacula-fd   | 2006-06-12 19:35:11 | F        | 193438   |
1286726610   |
+-------+-------------+---------------------+----------+----------+---------------+
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): 3
Enter JobId(s), comma separated, to restore: 3
You have selected the following JobId: 3
No authorization. Job "Corleone" not selected.

Building directory tree for JobId 3 ... 
+++++++++++++++++++++++++++++++++++++++++++++++++
1 Job, 120,685 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 /home/david.rodriguez-dem
cwd is: /home/david.rodriguez-dem/
$ mark Firefox_wallpaper.png
1 file marked.
$ done
Bootstrap records written to /var/bacula/bacula-dir.1.restore.bsr

The job will require the following Volumes:

   F-0001


1 file selected to be restored.

Automatically selected Job: RestoreFiles-Linux
Automatically selected Client: brandy2-fd
Run Restore job
JobName:    RestoreFiles-Linux
Bootstrap:  /var/bacula/bacula-dir.1.restore.bsr
Where:      /tmp/bacula-restores
Replace:    always
FileSet:    Linux
Client:     brandy2-fd
Storage:    FDA
When:       2006-06-13 15:56:06
Catalog:    MyCatalog
Priority:   10
OK to run? (yes/mod/no): yes
Job started. JobId=17
You have messages.
*q






The job message is the following:


13-Jun 15:56 bacula-dir: Start Restore Job
RestoreFiles-Linux.2006-06-13_15.56.23
13-Jun 15:56 bacula-sd: Ready to read from volume "F-0001" on device "FDA"
(/backupsFDA).
13-Jun 15:56 bacula-dir: Bacula 1.38.9 (02May06): 13-Jun-2006 15:56:41
  JobId:                  17
  Job:                    RestoreFiles-Linux.2006-06-13_15.56.23
  Client:                 brandy2-fd
  Start time:             13-Jun-2006 15:56:25
  End time:               13-Jun-2006 15:56:41
  Files Expected:         1
  Files Restored:         1
  Bytes Restored:         1,953,483
  Rate:                   122.1 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK

13-Jun 15:56 bacula-dir: Begin pruning Jobs.
13-Jun 15:56 bacula-dir: No Jobs found to prune.
13-Jun 15:56 bacula-dir: Begin pruning Files.
13-Jun 15:56 bacula-dir: No Files found to prune.
13-Jun 15:56 bacula-dir: End auto prune.






And selected file (Firefox_wallpaper.png) in restore job was restored in
Brandy2 client:


[EMAIL PROTECTED] bacula]# ls
/tmp/bacula-restores/home/david.rodriguez-dem/Firefox_wallpaper.png
/tmp/bacula-restores/home/david.rodriguez-dem/Firefox_wallpaper.png
--
View this message in context: 
http://www.nabble.com/Client-console-restrictions-t1773302.html#a4848323
Sent from the Bacula - Users forum at Nabble.com.



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to