Re: [Bacula-users] Copy Job of a bunch of backups?
On 5/27/22 05:27, Pierre Bernhardt wrote: Hello, I create a full backup each 1st Sunday, diff backups of rest of Sundays, incremental backups each day. I would create a copy after the first day of a month backup has been made. The data should be copied from the last backup however it has been made. So for the moment I create a restore before a given date/time and create a full backup of these restore to a special tape. Is there a "virtual copy" possible which which I can configure to create one copy job based on backup before a specified time which made the same without having restore them before? If I understand correctly what you are asking, you could, hypothetically speaking, do a Virtual Full backup (i.e. construct a synthetic full backup job within the database from already-existing backups), and then run a Copy job to copy that Virtual Full job to a new tape. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Different copy jobs and in which pool to be the target
Yes. I believe that will work. On 5/27/22 11:32, ego...@ramattack.net wrote: Hi mates!! Nobody knows it then?. Could anyone know about my question of the Next Pool directive?. Could it be set this way?. /Job { / / Name = machine1-fd_copia_archivado_monthly/ / JobDefs = machine1-fd_defs/ / Type = Copy/ / Level = Full/ / Priority = 1/ /*Next Pool = machine1_catalog_archivado_monthly*/ / schedule = one_invented/ / Pool = machine1_catalog_archivado_monthly/ / Storage = File-machine1c/ / Selection Type = SQL Query/ / Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'machine1_catalog_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"/ /}/ /Job { / / Name = machine1-fd_copia_archivado_yearly/ / JobDefs = machine1-fd_defs/ / Type = Copy/ / Level = Full/ / Priority = 1/ /*Next Pool = machine1_catalog_archivado_yearly*/ / schedule = one_invented/ / Pool = machine1_catalog_archivado_yearly/ / Storage = File-machine1c/ / Selection Type = SQL Query/ / Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'catalogo_$parte1_nombre_catalogo"."_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"/ /}/ Thank you so much mates. I'm writting some code for automating this configurations and... I woud be extremely thankful if you could say me that it's possible to set it that way, and end up with a Full job copy, with the first job in the target pool machine1_catalog_archivado_monthly and with the second job one, with the copy in the target machine1_catalog_archivado_yearly... I could end up by seeing it too... when testing all this... but if you could save me some time, avoiding to write something is wrong and later changing it... it would be really nice :) :) Sorry if I'm asking so much :( Very thankful, again for all your help, Best regards, El 2022-05-26 20:50, egoitz--- via Bacula-users escribió: ATENCION: Este correo se ha enviado desde fuera de la organización. No pinche en los enlaces ni abra los adjuntos a no ser que reconozca el remitente y sepa que el contenido es seguro. Hi Josh!! Perhaps I have not be very clear with my explanation sorry It happens my sometimes :) :) Sorry again :) I wanted to mean that... I preferred not to use in the Run line the "Next Pool" directive. For that purpose I have generated a couple of jobs : - One for monthly archival with it's schedule - One for yearly archival with it's schedule too... In that two jobs I have set the Next pool directive for avoiding the fact of using it in Run line in the schedule. So I planned something as : /Job { / / Name = machine1-fd_copia_archivado_monthly/ / JobDefs = machine1-fd_defs/ / Type = Copy/ / Level = Full/ / Priority = 1/ /*Next Pool = machine1_catalog_archivado_monthly*/ / schedule = one_invented/ / Pool = machine1_catalog_archivado_monthly/ / Storage = File-machine1c/ / Selection Type = SQL Query/ / Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'machine1_catalog_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"/ /}/ /Job { / / Name = machine1-fd_copia_archivado_yearly/ / JobDefs = machine1-fd_defs/ / Type = Copy/ / Level = Full/ / Priority = 1/ /*Next Pool = machine1_catalog_archivado_yearly*/ / schedule = one_invented/ / Pool = machine1_catalog_archivado_yearly/ / Storage = File-machine1c/ / Selection Type = SQL Query/ / Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'catalogo_$parte1_nombre_catalogo"."_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"/ /}/ The only reason is just a codding reason... for avoiding writting tons of Schedules one for each catalog... because as you see... the catalog is part of the name of the pool and... that was really the question if I could specify the next pool in the own archival jobs... creating one for each archival job As always many thanks mates :) Cheers!!
Re: [Bacula-users] Different copy jobs and in which pool to be the target
I believe it does, but this is very easy to confirm. You can validate the Bacula daemons configurations syntax and directives with the e.g. bacula-dir -t Rgds. -- MSc Heitor Faria (Miami/USA) CIO Bacula LatAm mobile1: + 1 909 655-8971 mobile2: + 55 61 98268-4220 [ http://bacula.lat/]___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Different copy jobs and in which pool to be the target
Hi mates!! Nobody knows it then?. Could anyone know about my question of the Next Pool directive?. Could it be set this way?. _Job { _ _Name = machine1-fd_copia_archivado_monthly_ _JobDefs = machine1-fd_defs_ _Type = Copy_ _Level = Full_ _Priority = 1_ _NEXT POOL = MACHINE1_CATALOG_ARCHIVADO_MONTHLY_ _schedule = one_invented_ _Pool = machine1_catalog_archivado_monthly_ _Storage = File-machine1c_ _Selection Type = SQL Query_ _Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'machine1_catalog_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"_ _}_ _Job { _ _Name = machine1-fd_copia_archivado_yearly_ _JobDefs = machine1-fd_defs_ _Type = Copy_ _Level = Full_ _Priority = 1_ _NEXT POOL = MACHINE1_CATALOG_ARCHIVADO_YEARLY_ _schedule = one_invented_ _Pool = machine1_catalog_archivado_yearly_ _Storage = File-machine1c_ _Selection Type = SQL Query_ _Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name \= \'catalogo_$parte1_nombre_catalogo"."_full\' AND J\.name like \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC LIMIT 1\"_ _}_ Thank you so much mates. I'm writting some code for automating this configurations and... I woud be extremely thankful if you could say me that it's possible to set it that way, and end up with a Full job copy, with the first job in the target pool machine1_catalog_archivado_monthly and with the second job one, with the copy in the target machine1_catalog_archivado_yearly... I could end up by seeing it too... when testing all this... but if you could save me some time, avoiding to write something is wrong and later changing it... it would be really nice :) :) Sorry if I'm asking so much :( Very thankful, again for all your help, Best regards, El 2022-05-26 20:50, egoitz--- via Bacula-users escribió: > ATENCION: Este correo se ha enviado desde fuera de la organización. No pinche > en los enlaces ni abra los adjuntos a no ser que reconozca el remitente y > sepa que el contenido es seguro. > > Hi Josh!! > > Perhaps I have not be very clear with my explanation sorry It happens my > sometimes :) :) Sorry again :) > > I wanted to mean that... I preferred not to use in the Run line the "Next > Pool" directive. For that purpose I have generated a couple of jobs : > > - One for monthly archival with it's schedule > > - One for yearly archival with it's schedule too... > > In that two jobs I have set the Next pool directive for avoiding the fact of > using it in Run line in the schedule. > > So I planned something as : > > _Job { _ > _Name = machine1-fd_copia_archivado_monthly_ > _JobDefs = machine1-fd_defs_ > _Type = Copy_ > _Level = Full_ > _Priority = 1_ > _NEXT POOL = MACHINE1_CATALOG_ARCHIVADO_MONTHLY_ > _schedule = one_invented_ > _Pool = machine1_catalog_archivado_monthly_ > _Storage = File-machine1c_ > _Selection Type = SQL Query_ > _Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name > \= \'machine1_catalog_full\' AND J\.name like \'\%$digitos_administrativo\%\' > AND P\.PoolId = J\.PoolId AND J\.level=\'F\' AND J\.Type = \'B\' AND > J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 AND J\.StartTime \> > \(current_timestamp - interval \'20 day\'\) ORDER BY J\.realendtime DESC > LIMIT 1\"_ > _}_ > > _Job { _ > _Name = machine1-fd_copia_archivado_yearly_ > _JobDefs = machine1-fd_defs_ > _Type = Copy_ > _Level = Full_ > _Priority = 1_ > _NEXT POOL = MACHINE1_CATALOG_ARCHIVADO_YEARLY_ > _schedule = one_invented_ > _Pool = machine1_catalog_archivado_yearly_ > _Storage = File-machine1c_ > _Selection Type = SQL Query_ > _Selection Pattern = "SELECT J\.JobId FROM Job J\, Pool P WHERE P\.Name > \= \'catalogo_$parte1_nombre_catalogo"."_full\' AND J\.name like > \'\%$digitos_administrativo\%\' AND P\.PoolId = J\.PoolId AND J\.level=\'F\' > AND J\.Type = \'B\' AND J\.JobStatus IN \(\'T\'\,\'W\'\) AND J\.jobBytes \> 0 > AND J\.StartTime \> \(current_timestamp - interval \'20 day\'\) ORDER BY > J\.realendtime DESC LIMIT 1\"_ > _}_ > > The only reason is just a codding reason... for avoiding writting tons of > Schedules one for each catalog... because as you see... the catalog is part > of the name of the pool and... that was really the question if I > could specify the next pool in the own archival jobs... creating one for each > archival job > > As always many thanks
Re: [Bacula-users] Waiting for a volume already in the drive
Morning, I think I figured it out. It looks like the system that was being backed disconnected while despooling Is there a way to avoid the whole bacula hanging if bacula SD server have a temporary disconnection ? Time: 2022-05-24 05:03:10 LogText: bacula-dir JobId 46250: Using Device "ULTRIUM-HH7" to write. Time: 2022-05-24 05:03:11 LogText: eng-backup01-sd JobId 46250: Spooling data ... Time: 2022-05-24 07:46:51 LogText: bacula-fd JobId 46250: Error: bsock.c:649 Write error sending 33912 bytes to Storage daemon:eng-backup01.example.com:9103: ERR=Connection timed out Time: 2022-05-24 07:46:51 LogText: bacula-fd JobId 46250: Fatal error: backup.c:843 Network send error to SD. ERR=Connection timed out Time: 2022-05-24 07:47:01 LogText: bacula-fd JobId 46250: Error: bsock.c:537 Socket has errors=1 on call to Storage daemon:eng-backup01.example.com:9103 Time: 2022-05-24 08:00:13 LogText: bacula-dir JobId 46250: Error: Director's connection to SD for this Job was lost. Time: 2022-05-24 08:00:13 Regards, William From: Pierre Bernhardt Sent: May 27, 2022 5:18 AM To: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Waiting for a volume already in the drive CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hello, it's looks like an issue which I had from time to time. I tried to unload the media and reload it. By the way it was really a rare situation and I could not trigger it by planned actions. Maybe it is a good Idea to check also the status of the tapedrive itself e.g by tapeinfo -f Cheers, Pierre ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Copy Job of a bunch of backups?
On 2022-05-27 11:27, Pierre Bernhardt wrote: Hello, I create a full backup each 1st Sunday, diff backups of rest of Sundays, incremental backups each day. I would create a copy after the first day of a month backup has been made. The data should be copied from the last backup however it has been made. So for the moment I create a restore before a given date/time and create a full backup of these restore to a special tape. Is there a "virtual copy" possible which which I can configure to create one copy job based on backup before a specified time which made the same without having restore them before? Hi Pierre The solution would be to use SQLQuery selection type in your Copy job. These are the options you are looking for: Selection Type = SQLQuery Selection Pattern = "" You just need to devise a query that will return the list of Job IDs you want to copy in the first column of the query output. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Copy Job of a bunch of backups?
Hello, I create a full backup each 1st Sunday, diff backups of rest of Sundays, incremental backups each day. I would create a copy after the first day of a month backup has been made. The data should be copied from the last backup however it has been made. So for the moment I create a restore before a given date/time and create a full backup of these restore to a special tape. Is there a "virtual copy" possible which which I can configure to create one copy job based on backup before a specified time which made the same without having restore them before? Thx, Pierre ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Waiting for a volume already in the drive
Hello, it's looks like an issue which I had from time to time. I tried to unload the media and reload it. By the way it was really a rare situation and I could not trigger it by planned actions. Maybe it is a good Idea to check also the status of the tapedrive itself e.g by tapeinfo -f Cheers, Pierre ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] query.sql
Hello Phil and Giuseppe, Thanks for the fix and the review, I will fix the current query file. It will be included in the next beta 11.3.4 that is almost ready. Best Regards, Eric On 25.05.22 21:24, Phil Stracchino wrote: On 5/25/22 13:23, SO Giuseppe - COMAE via Bacula-users wrote: SELECT count(*) AS Jobs,sum(JobFiles) AS Files,sum(JobBytes) AS Bytes,VolumeName FROM (SELECT DISTINCT Jobmedia.JobId, JobFiles, JobBytes, VolumeName FROM Job,JobMedia,Media WHERE JobMedia.JobId=Job.JobId AND JobMedia.MediaId=Media.MediaId) AS f GROUP BY VolumeName ORDER BY VolumeName; MySQL 127.0.0.1> SELECT count(*) AS Jobs,sum(JobFiles) AS Files,sum(JobBytes) AS Bytes,VolumeName -> FROM (SELECT DISTINCT Jobmedia.JobId, JobFiles, JobBytes, VolumeName -> FROM Job,JobMedia,Media -> WHERE JobMedia.JobId=Job.JobId -> AND JobMedia.MediaId=Media.MediaId) AS f -> GROUP BY VolumeName -> ORDER BY VolumeName; ERROR 1054 (42S22): Unknown column 'Jobmedia.JobId' in 'field list' Straightforward typo in line 3. You have Jobmedia instead of JobMedia. With the typo fixed, yes, this yields much more reasonable and correct-looking results. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users