Re: [Bacula-users] Procedure to remove properly client
Hi Heitor As suggested I ran a "list jobs client=old-fd" in order to delete all jobs associated with that old client. Then I ran the dbcheck -b and dbcheck -f but still there is the same amount of volume files saved on my disk which contains the backups. So I deduct here that none of the above commands here deleted the old volume files from my storage disk. So my question remains: how do I find out which volume files I need to delete manually? or is there another command from bconsole which can do that? For me there is no point keeping the volumes files om my disk any longer if anyway I deleted all the jobs, etc associated to this client. Regards, John On Sat, Jan 20, 2018 at 11:23 PM, Heitor Fariawrote: > Hello, John, > >> Ok so there is no "magic" delete client command with Bacula which >> would do the whole job in one command, I now get that. So instead of >> using the SQL queries directly on the database I could use the >> "delete" command with bconsole for every type of resource used by that >> client but I still have one major problem: how can I find out in >> bconsole which volume for that specific client I need to delete? > > E.g. *list jobmedia client=hfaria-P65-fd > But you probably don't need that. > Just perform a: > > *list jobs client=deprecated-fd > > And delete the listed jobids. > > *delete jobid=xx > > You might also need to run a Bacula Shell dbcheck command to clean the Client > unnecessary entries, as follows: > > service bacula-dir stop > dbcheck -b /var/spool/bacula/ > dbcheck -f /var/spool/bacula/ > 12) Eliminate orphaned Client records > >> Best regards, > > Please remove text trash from the email history when replying, such as > Sourceforge ads. > > Regards, > >> John >> >> On Sat, Jan 20, 2018 at 9:07 AM, Kern Sibbald wrote: >>> Well, >>> >>> There is a delete command that deletes jobs, volumes, pools, and if I am not >>> mistaken jobids. If you have a single job that handles multiple clients, >>> then the delete job will not be useful. I do not normally delete clients, so >>> I cannot say 100% how to do this but I suspect that with a small shell >>> script, you can delete each of the JobIds associated with the client. >>> >>> Best regards, >>> >>> Kern >>> >>> >>> >>> On 19.01.2018 21:14, John Naggets wrote: Kern, that's exactly what I would like to do: I would like to delete properly and safely a client using the bacula tools for that purpose. Can you let me know which command(s) I need to use in bconsole in order to remove properly a client? Regards, John On Fri, Jan 19, 2018 at 6:46 PM, Kern Sibbald wrote: > > It is a *very* bad idea to do any direct operations on the SQL database, > particularly deleting records. This is NOT a good solution. > > If you need to delete a client, you should do it through some bconsole > command (other than the sql command) so that all the tables/records that > are > connected to a client are also deleted. > > Best regards, > > Kern > > > On 17.01.2018 10:51, Rolf Halmen wrote: > > Hi John, > > turns out we're cheating. > > mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE > Name='${FDHOSTNAME}';" bacula > dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf > > So we're just deleting the client, and then let bacula get the database > back into a consistent state. > > Depending on your load and requirements that might not be feasible for > you, of course. > > Kind regards, > Rolf Halmen > > > On 16.01.2018 17:47, John Naggets wrote: > > Hi Rolf, > > So if I understand correctly, there is no "standard" procedure or any > documentation how to properly remove a client once it is not needed > anymore (e.g. when decomissioning a server)? > > If not I would be interested to see your SQL query which you use for > that purpose. > > Indeed I use the "use volume once = true" parameter so that each > volume contains only one single backup from a client. > > Best regards, > J. > > On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen > wrote: > > Hi John, > > The database can correlate jobs to volume files. > I'm not at a workstation right now, but off the top of my head, I'd > assume > joining the jobs, media, and clients tables should let you get to the > list > of volumes that contain backup-data of the specified client. > > Do keep in mind that volume files can contain data from multiple jobs, > unless "use volume once = true". > > Kind regards, > Rolf > > On January 15, 2018 2:10:00 PM UTC, John Naggets > > wrote: > > Hello, > > It happens that some clients on the
Re: [Bacula-users] Procedure to remove properly client
Hello, John, > Ok so there is no "magic" delete client command with Bacula which > would do the whole job in one command, I now get that. So instead of > using the SQL queries directly on the database I could use the > "delete" command with bconsole for every type of resource used by that > client but I still have one major problem: how can I find out in > bconsole which volume for that specific client I need to delete? E.g. *list jobmedia client=hfaria-P65-fd But you probably don't need that. Just perform a: *list jobs client=deprecated-fd And delete the listed jobids. *delete jobid=xx You might also need to run a Bacula Shell dbcheck command to clean the Client unnecessary entries, as follows: service bacula-dir stop dbcheck -b /var/spool/bacula/ dbcheck -f /var/spool/bacula/ 12) Eliminate orphaned Client records > Best regards, Please remove text trash from the email history when replying, such as Sourceforge ads. Regards, > John > > On Sat, Jan 20, 2018 at 9:07 AM, Kern Sibbaldwrote: >> Well, >> >> There is a delete command that deletes jobs, volumes, pools, and if I am not >> mistaken jobids. If you have a single job that handles multiple clients, >> then the delete job will not be useful. I do not normally delete clients, so >> I cannot say 100% how to do this but I suspect that with a small shell >> script, you can delete each of the JobIds associated with the client. >> >> Best regards, >> >> Kern >> >> >> >> On 19.01.2018 21:14, John Naggets wrote: >>> >>> Kern, that's exactly what I would like to do: I would like to delete >>> properly and safely a client using the bacula tools for that purpose. >>> >>> Can you let me know which command(s) I need to use in bconsole in >>> order to remove properly a client? >>> >>> Regards, >>> John >>> >>> On Fri, Jan 19, 2018 at 6:46 PM, Kern Sibbald wrote: It is a *very* bad idea to do any direct operations on the SQL database, particularly deleting records. This is NOT a good solution. If you need to delete a client, you should do it through some bconsole command (other than the sql command) so that all the tables/records that are connected to a client are also deleted. Best regards, Kern On 17.01.2018 10:51, Rolf Halmen wrote: Hi John, turns out we're cheating. mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE Name='${FDHOSTNAME}';" bacula dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf So we're just deleting the client, and then let bacula get the database back into a consistent state. Depending on your load and requirements that might not be feasible for you, of course. Kind regards, Rolf Halmen On 16.01.2018 17:47, John Naggets wrote: Hi Rolf, So if I understand correctly, there is no "standard" procedure or any documentation how to properly remove a client once it is not needed anymore (e.g. when decomissioning a server)? If not I would be interested to see your SQL query which you use for that purpose. Indeed I use the "use volume once = true" parameter so that each volume contains only one single backup from a client. Best regards, J. On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen wrote: Hi John, The database can correlate jobs to volume files. I'm not at a workstation right now, but off the top of my head, I'd assume joining the jobs, media, and clients tables should let you get to the list of volumes that contain backup-data of the specified client. Do keep in mind that volume files can contain data from multiple jobs, unless "use volume once = true". Kind regards, Rolf On January 15, 2018 2:10:00 PM UTC, John Naggets wrote: Hello, It happens that some clients on the network get removed and as such do not need to be backed up anymore. Now I would like to know what is the procedure on the bacula director in order to remove properly and entirely a bacula client? I checked the official documentation but could not find any procedure for that purpose. From my understanding I need to delete the jobs and files associated with them as well as the volumes and finally the physical volumes on the filesystem (backups are done on files on a partition of the backup server). My problem here is that the physical volumes on the filesystem all have the same label except for the number so how would I know which file I can delete? Thank you in advance for your help. Best regards, John Regards, --
Re: [Bacula-users] Procedure to remove properly client
Ok so there is no "magic" delete client command with Bacula which would do the whole job in one command, I now get that. So instead of using the SQL queries directly on the database I could use the "delete" command with bconsole for every type of resource used by that client but I still have one major problem: how can I find out in bconsole which volume for that specific client I need to delete? as a reminder my volumes are all called the same name, they just have a different Id number at the end. Best regards, John On Sat, Jan 20, 2018 at 9:07 AM, Kern Sibbaldwrote: > Well, > > There is a delete command that deletes jobs, volumes, pools, and if I am not > mistaken jobids. If you have a single job that handles multiple clients, > then the delete job will not be useful. I do not normally delete clients, so > I cannot say 100% how to do this but I suspect that with a small shell > script, you can delete each of the JobIds associated with the client. > > Best regards, > > Kern > > > > On 19.01.2018 21:14, John Naggets wrote: >> >> Kern, that's exactly what I would like to do: I would like to delete >> properly and safely a client using the bacula tools for that purpose. >> >> Can you let me know which command(s) I need to use in bconsole in >> order to remove properly a client? >> >> Regards, >> John >> >> On Fri, Jan 19, 2018 at 6:46 PM, Kern Sibbald wrote: >>> >>> It is a *very* bad idea to do any direct operations on the SQL database, >>> particularly deleting records. This is NOT a good solution. >>> >>> If you need to delete a client, you should do it through some bconsole >>> command (other than the sql command) so that all the tables/records that >>> are >>> connected to a client are also deleted. >>> >>> Best regards, >>> >>> Kern >>> >>> >>> On 17.01.2018 10:51, Rolf Halmen wrote: >>> >>> Hi John, >>> >>> turns out we're cheating. >>> >>> mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE >>> Name='${FDHOSTNAME}';" bacula >>> dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf >>> >>> So we're just deleting the client, and then let bacula get the database >>> back into a consistent state. >>> >>> Depending on your load and requirements that might not be feasible for >>> you, of course. >>> >>> Kind regards, >>> Rolf Halmen >>> >>> >>> On 16.01.2018 17:47, John Naggets wrote: >>> >>> Hi Rolf, >>> >>> So if I understand correctly, there is no "standard" procedure or any >>> documentation how to properly remove a client once it is not needed >>> anymore (e.g. when decomissioning a server)? >>> >>> If not I would be interested to see your SQL query which you use for >>> that purpose. >>> >>> Indeed I use the "use volume once = true" parameter so that each >>> volume contains only one single backup from a client. >>> >>> Best regards, >>> J. >>> >>> On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen >>> wrote: >>> >>> Hi John, >>> >>> The database can correlate jobs to volume files. >>> I'm not at a workstation right now, but off the top of my head, I'd >>> assume >>> joining the jobs, media, and clients tables should let you get to the >>> list >>> of volumes that contain backup-data of the specified client. >>> >>> Do keep in mind that volume files can contain data from multiple jobs, >>> unless "use volume once = true". >>> >>> Kind regards, >>> Rolf >>> >>> On January 15, 2018 2:10:00 PM UTC, John Naggets >>> >>> wrote: >>> >>> Hello, >>> >>> It happens that some clients on the network get removed and as such do >>> not need to be backed up anymore. Now I would like to know what is the >>> procedure on the bacula director in order to remove properly and >>> entirely a bacula client? >>> >>> I checked the official documentation but could not find any procedure >>> for that purpose. >>> >>> From my understanding I need to delete the jobs and files associated >>> with them as well as the volumes and finally the physical volumes on >>> the filesystem (backups are done on files on a partition of the backup >>> server). >>> >>> My problem here is that the physical volumes on the filesystem all >>> have the same label except for the number so how would I know which >>> file I can delete? >>> >>> Thank you in advance for your help. >>> >>> Best regards, >>> John >>> >>> >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> >>> >>> Bacula-users mailing list >>> Bacula-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>> >>> -- >>> Sent from my Android device with K-9 Mail. Please excuse my brevity. >>> >>> >>> -- >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org!
Re: [Bacula-users] Procedure to remove properly client
Well, There is a delete command that deletes jobs, volumes, pools, and if I am not mistaken jobids. If you have a single job that handles multiple clients, then the delete job will not be useful. I do not normally delete clients, so I cannot say 100% how to do this but I suspect that with a small shell script, you can delete each of the JobIds associated with the client. Best regards, Kern On 19.01.2018 21:14, John Naggets wrote: Kern, that's exactly what I would like to do: I would like to delete properly and safely a client using the bacula tools for that purpose. Can you let me know which command(s) I need to use in bconsole in order to remove properly a client? Regards, John On Fri, Jan 19, 2018 at 6:46 PM, Kern Sibbaldwrote: It is a *very* bad idea to do any direct operations on the SQL database, particularly deleting records. This is NOT a good solution. If you need to delete a client, you should do it through some bconsole command (other than the sql command) so that all the tables/records that are connected to a client are also deleted. Best regards, Kern On 17.01.2018 10:51, Rolf Halmen wrote: Hi John, turns out we're cheating. mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE Name='${FDHOSTNAME}';" bacula dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf So we're just deleting the client, and then let bacula get the database back into a consistent state. Depending on your load and requirements that might not be feasible for you, of course. Kind regards, Rolf Halmen On 16.01.2018 17:47, John Naggets wrote: Hi Rolf, So if I understand correctly, there is no "standard" procedure or any documentation how to properly remove a client once it is not needed anymore (e.g. when decomissioning a server)? If not I would be interested to see your SQL query which you use for that purpose. Indeed I use the "use volume once = true" parameter so that each volume contains only one single backup from a client. Best regards, J. On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen wrote: Hi John, The database can correlate jobs to volume files. I'm not at a workstation right now, but off the top of my head, I'd assume joining the jobs, media, and clients tables should let you get to the list of volumes that contain backup-data of the specified client. Do keep in mind that volume files can contain data from multiple jobs, unless "use volume once = true". Kind regards, Rolf On January 15, 2018 2:10:00 PM UTC, John Naggets wrote: Hello, It happens that some clients on the network get removed and as such do not need to be backed up anymore. Now I would like to know what is the procedure on the bacula director in order to remove properly and entirely a bacula client? I checked the official documentation but could not find any procedure for that purpose. From my understanding I need to delete the jobs and files associated with them as well as the volumes and finally the physical volumes on the filesystem (backups are done on files on a partition of the backup server). My problem here is that the physical volumes on the filesystem all have the same label except for the number so how would I know which file I can delete? Thank you in advance for your help. Best regards, John Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
Kern, that's exactly what I would like to do: I would like to delete properly and safely a client using the bacula tools for that purpose. Can you let me know which command(s) I need to use in bconsole in order to remove properly a client? Regards, John On Fri, Jan 19, 2018 at 6:46 PM, Kern Sibbaldwrote: > It is a *very* bad idea to do any direct operations on the SQL database, > particularly deleting records. This is NOT a good solution. > > If you need to delete a client, you should do it through some bconsole > command (other than the sql command) so that all the tables/records that are > connected to a client are also deleted. > > Best regards, > > Kern > > > On 17.01.2018 10:51, Rolf Halmen wrote: > > Hi John, > > turns out we're cheating. > > mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE > Name='${FDHOSTNAME}';" bacula > dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf > > So we're just deleting the client, and then let bacula get the database > back into a consistent state. > > Depending on your load and requirements that might not be feasible for > you, of course. > > Kind regards, > Rolf Halmen > > > On 16.01.2018 17:47, John Naggets wrote: > > Hi Rolf, > > So if I understand correctly, there is no "standard" procedure or any > documentation how to properly remove a client once it is not needed > anymore (e.g. when decomissioning a server)? > > If not I would be interested to see your SQL query which you use for > that purpose. > > Indeed I use the "use volume once = true" parameter so that each > volume contains only one single backup from a client. > > Best regards, > J. > > On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen > wrote: > > Hi John, > > The database can correlate jobs to volume files. > I'm not at a workstation right now, but off the top of my head, I'd assume > joining the jobs, media, and clients tables should let you get to the list > of volumes that contain backup-data of the specified client. > > Do keep in mind that volume files can contain data from multiple jobs, > unless "use volume once = true". > > Kind regards, > Rolf > > On January 15, 2018 2:10:00 PM UTC, John Naggets > wrote: > > Hello, > > It happens that some clients on the network get removed and as such do > not need to be backed up anymore. Now I would like to know what is the > procedure on the bacula director in order to remove properly and > entirely a bacula client? > > I checked the official documentation but could not find any procedure > for that purpose. > > From my understanding I need to delete the jobs and files associated > with them as well as the volumes and finally the physical volumes on > the filesystem (backups are done on files on a partition of the backup > server). > > My problem here is that the physical volumes on the filesystem all > have the same label except for the number so how would I know which > file I can delete? > > Thank you in advance for your help. > > Best regards, > John > > > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
It is a *very* bad idea to do any direct operations on the SQL database, particularly deleting records. This is NOT a good solution. If you need to delete a client, you should do it through some bconsole command (other than the sql command) so that all the tables/records that are connected to a client are also deleted. Best regards, Kern On 17.01.2018 10:51, Rolf Halmen wrote: Hi John, turns out we're cheating. mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE Name='${FDHOSTNAME}';" bacula dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf So we're just deleting the client, and then let bacula get the database back into a consistent state. Depending on your load and requirements that might not be feasible for you, of course. Kind regards, Rolf Halmen On 16.01.2018 17:47, John Naggets wrote: Hi Rolf, So if I understand correctly, there is no "standard" procedure or any documentation how to properly remove a client once it is not needed anymore (e.g. when decomissioning a server)? If not I would be interested to see your SQL query which you use for that purpose. Indeed I use the "use volume _once_ = true" parameter so that each volume contains only one single backup from a client. Best regards, J. On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmenwrote: Hi John, The database can correlate jobs to volume files. I'm not at a workstation right now, but off the top of my head, I'd assume joining the jobs, media, and clients tables should let you get to the list of volumes that contain backup-data of the specified client. Do keep in mind that volume files can contain data from multiple jobs, unless "use volume _once_ = true". Kind regards, Rolf On January 15, 2018 2:10:00 PM UTC, John Naggets wrote: Hello, It happens that some clients on the network get removed and as such do not need to be backed up anymore. Now I would like to know what is the procedure on the bacula director in order to remove properly and entirely a bacula client? I checked the official documentation but could not find any procedure for that purpose. >From my understanding I need to delete the jobs and files associated with them as well as the volumes and finally the physical volumes on the filesystem (backups are done on files on a partition of the backup server). My problem here is that the physical volumes on the filesystem all have the same label except for the number so how would I know which file I can delete? Thank you in advance for your help. Best regards, John Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
Hi John, that's a bit trickier, and I don't have code for that, but I've seen it done. After doing the database bit, you can do something like this: foreach (volume-file); do if (file not listed in database); then delete else keep I wouldn't call it elegant, but it works. Kind regards, Rolf On 17.01.2018 14:10, John Naggets wrote: > Thanks Rolf for the details and SQL query you use for that purpose. I > am currently testing this out. By the way there is no "-y" option on > my Bacula version (7.4.4) so I used use "-v" for verbose instead. I > suppose this takes quite some time as I have quite a few clients and > it''s still running. > > Now I still have one issue: what about the physical files (volumes) on > the partition of my backup server? How can know which one to safely > delete for a specific client? My problem is that all my volume files > are called/labelled with "backupservername-". So from the file > name I can't know to which client it belongs. > > Regards, > J. > > On Wed, Jan 17, 2018 at 10:51 AM, Rolf Halmen >wrote: >> Hi John, >> >> turns out we're cheating. >> >> mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE >> Name='${FDHOSTNAME}';" bacula >> dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf >> >> So we're just deleting the client, and then let bacula get the database >> back into a consistent state. >> >> Depending on your load and requirements that might not be feasible for >> you, of course. >> >> Kind regards, >> Rolf Halmen >> >> >> On 16.01.2018 17:47, John Naggets wrote: >>> Hi Rolf, >>> >>> So if I understand correctly, there is no "standard" procedure or any >>> documentation how to properly remove a client once it is not needed >>> anymore (e.g. when decomissioning a server)? >>> >>> If not I would be interested to see your SQL query which you use for >>> that purpose. >>> >>> Indeed I use the "use volume once = true" parameter so that each >>> volume contains only one single backup from a client. >>> >>> Best regards, >>> J. >>> >>> On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen >>> wrote: Hi John, The database can correlate jobs to volume files. I'm not at a workstation right now, but off the top of my head, I'd assume joining the jobs, media, and clients tables should let you get to the list of volumes that contain backup-data of the specified client. Do keep in mind that volume files can contain data from multiple jobs, unless "use volume once = true". Kind regards, Rolf On January 15, 2018 2:10:00 PM UTC, John Naggets wrote: > Hello, > > It happens that some clients on the network get removed and as such do > not need to be backed up anymore. Now I would like to know what is the > procedure on the bacula director in order to remove properly and > entirely a bacula client? > > I checked the official documentation but could not find any procedure > for that purpose. > > From my understanding I need to delete the jobs and files associated > with them as well as the volumes and finally the physical volumes on > the filesystem (backups are done on files on a partition of the backup > server). > > My problem here is that the physical volumes on the filesystem all > have the same label except for the number so how would I know which > file I can delete? > > Thank you in advance for your help. > > Best regards, > John > > > > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users >> -- >> Rolf Michael Halmen >> Softwareentwickler >> >> Neubert Consulting GmbH, IT Consulting & Services >> >> Theaterstr. 33 >> D-90762 Fuerth >> >> Tel: +49 (0911) 972799 - 54 >> Fax: +49 (0911) 972799 - 33 >> >> Mail rolf.hal...@neubert-consulting.de >> Web www.neubert-consulting.de >> >> Geschäftsführer Christoph Neubert Registergericht Fürth HRB 10620 >> >> -- Rolf Michael Halmen Softwareentwickler Neubert Consulting GmbH, IT Consulting & Services Theaterstr. 33 D-90762 Fuerth Tel: +49 (0911)
Re: [Bacula-users] Procedure to remove properly client
Thanks Rolf for the details and SQL query you use for that purpose. I am currently testing this out. By the way there is no "-y" option on my Bacula version (7.4.4) so I used use "-v" for verbose instead. I suppose this takes quite some time as I have quite a few clients and it''s still running. Now I still have one issue: what about the physical files (volumes) on the partition of my backup server? How can know which one to safely delete for a specific client? My problem is that all my volume files are called/labelled with "backupservername-". So from the file name I can't know to which client it belongs. Regards, J. On Wed, Jan 17, 2018 at 10:51 AM, Rolf Halmenwrote: > Hi John, > > turns out we're cheating. > > mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE > Name='${FDHOSTNAME}';" bacula > dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf > > So we're just deleting the client, and then let bacula get the database > back into a consistent state. > > Depending on your load and requirements that might not be feasible for > you, of course. > > Kind regards, > Rolf Halmen > > > On 16.01.2018 17:47, John Naggets wrote: >> Hi Rolf, >> >> So if I understand correctly, there is no "standard" procedure or any >> documentation how to properly remove a client once it is not needed >> anymore (e.g. when decomissioning a server)? >> >> If not I would be interested to see your SQL query which you use for >> that purpose. >> >> Indeed I use the "use volume once = true" parameter so that each >> volume contains only one single backup from a client. >> >> Best regards, >> J. >> >> On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen >> wrote: >>> Hi John, >>> >>> The database can correlate jobs to volume files. >>> I'm not at a workstation right now, but off the top of my head, I'd assume >>> joining the jobs, media, and clients tables should let you get to the list >>> of volumes that contain backup-data of the specified client. >>> >>> Do keep in mind that volume files can contain data from multiple jobs, >>> unless "use volume once = true". >>> >>> Kind regards, >>> Rolf >>> >>> On January 15, 2018 2:10:00 PM UTC, John Naggets >>> wrote: Hello, It happens that some clients on the network get removed and as such do not need to be backed up anymore. Now I would like to know what is the procedure on the bacula director in order to remove properly and entirely a bacula client? I checked the official documentation but could not find any procedure for that purpose. From my understanding I need to delete the jobs and files associated with them as well as the volumes and finally the physical volumes on the filesystem (backups are done on files on a partition of the backup server). My problem here is that the physical volumes on the filesystem all have the same label except for the number so how would I know which file I can delete? Thank you in advance for your help. Best regards, John Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users >>> >>> -- >>> Sent from my Android device with K-9 Mail. Please excuse my brevity. >>> >>> -- >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> ___ >>> Bacula-users mailing list >>> Bacula-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>> > > -- > Rolf Michael Halmen > Softwareentwickler > > Neubert Consulting GmbH, IT Consulting & Services > > Theaterstr. 33 > D-90762 Fuerth > > Tel: +49 (0911) 972799 - 54 > Fax: +49 (0911) 972799 - 33 > > Mail rolf.hal...@neubert-consulting.de > Web www.neubert-consulting.de > > Geschäftsführer Christoph Neubert Registergericht Fürth HRB 10620 > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
Hi John, turns out we're cheating. mysql -u bacula -p${BACULAMYSQLPW} -e "DELETE FROM Client WHERE Name='${FDHOSTNAME}';" bacula dbcheck -b -f -y -c /etc/bacula/bacula-dir.conf So we're just deleting the client, and then let bacula get the database back into a consistent state. Depending on your load and requirements that might not be feasible for you, of course. Kind regards, Rolf Halmen On 16.01.2018 17:47, John Naggets wrote: > Hi Rolf, > > So if I understand correctly, there is no "standard" procedure or any > documentation how to properly remove a client once it is not needed > anymore (e.g. when decomissioning a server)? > > If not I would be interested to see your SQL query which you use for > that purpose. > > Indeed I use the "use volume once = true" parameter so that each > volume contains only one single backup from a client. > > Best regards, > J. > > On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmen >wrote: >> Hi John, >> >> The database can correlate jobs to volume files. >> I'm not at a workstation right now, but off the top of my head, I'd assume >> joining the jobs, media, and clients tables should let you get to the list >> of volumes that contain backup-data of the specified client. >> >> Do keep in mind that volume files can contain data from multiple jobs, >> unless "use volume once = true". >> >> Kind regards, >> Rolf >> >> On January 15, 2018 2:10:00 PM UTC, John Naggets >> wrote: >>> Hello, >>> >>> It happens that some clients on the network get removed and as such do >>> not need to be backed up anymore. Now I would like to know what is the >>> procedure on the bacula director in order to remove properly and >>> entirely a bacula client? >>> >>> I checked the official documentation but could not find any procedure >>> for that purpose. >>> >>> From my understanding I need to delete the jobs and files associated >>> with them as well as the volumes and finally the physical volumes on >>> the filesystem (backups are done on files on a partition of the backup >>> server). >>> >>> My problem here is that the physical volumes on the filesystem all >>> have the same label except for the number so how would I know which >>> file I can delete? >>> >>> Thank you in advance for your help. >>> >>> Best regards, >>> John >>> >>> >>> >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> >>> >>> Bacula-users mailing list >>> Bacula-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/bacula-users >> >> -- >> Sent from my Android device with K-9 Mail. Please excuse my brevity. >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Bacula-users mailing list >> Bacula-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bacula-users >> -- Rolf Michael Halmen Softwareentwickler Neubert Consulting GmbH, IT Consulting & Services Theaterstr. 33 D-90762 Fuerth Tel: +49 (0911) 972799 - 54 Fax: +49 (0911) 972799 - 33 Mail rolf.hal...@neubert-consulting.de Web www.neubert-consulting.de Geschäftsführer Christoph Neubert Registergericht Fürth HRB 10620 smime.p7s Description: S/MIME Cryptographic Signature -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
Hi Rolf, So if I understand correctly, there is no "standard" procedure or any documentation how to properly remove a client once it is not needed anymore (e.g. when decomissioning a server)? If not I would be interested to see your SQL query which you use for that purpose. Indeed I use the "use volume once = true" parameter so that each volume contains only one single backup from a client. Best regards, J. On Mon, Jan 15, 2018 at 4:59 PM, Rolf Halmenwrote: > Hi John, > > The database can correlate jobs to volume files. > I'm not at a workstation right now, but off the top of my head, I'd assume > joining the jobs, media, and clients tables should let you get to the list > of volumes that contain backup-data of the specified client. > > Do keep in mind that volume files can contain data from multiple jobs, > unless "use volume once = true". > > Kind regards, > Rolf > > On January 15, 2018 2:10:00 PM UTC, John Naggets > wrote: >> >> Hello, >> >> It happens that some clients on the network get removed and as such do >> not need to be backed up anymore. Now I would like to know what is the >> procedure on the bacula director in order to remove properly and >> entirely a bacula client? >> >> I checked the official documentation but could not find any procedure >> for that purpose. >> >> From my understanding I need to delete the jobs and files associated >> with them as well as the volumes and finally the physical volumes on >> the filesystem (backups are done on files on a partition of the backup >> server). >> >> My problem here is that the physical volumes on the filesystem all >> have the same label except for the number so how would I know which >> file I can delete? >> >> Thank you in advance for your help. >> >> Best regards, >> John >> >> >> >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> Bacula-users mailing list >> Bacula-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bacula-users > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Procedure to remove properly client
Hi John, The database can correlate jobs to volume files. I'm not at a workstation right now, but off the top of my head, I'd assume joining the jobs, media, and clients tables should let you get to the list of volumes that contain backup-data of the specified client. Do keep in mind that volume files can contain data from multiple jobs, unless "use volume once = true". Kind regards, Rolf On January 15, 2018 2:10:00 PM UTC, John Naggetswrote: >Hello, > >It happens that some clients on the network get removed and as such do >not need to be backed up anymore. Now I would like to know what is the >procedure on the bacula director in order to remove properly and >entirely a bacula client? > >I checked the official documentation but could not find any procedure >for that purpose. > >From my understanding I need to delete the jobs and files associated >with them as well as the volumes and finally the physical volumes on >the filesystem (backups are done on files on a partition of the backup >server). > >My problem here is that the physical volumes on the filesystem all >have the same label except for the number so how would I know which >file I can delete? > >Thank you in advance for your help. > >Best regards, >John > >-- >Check out the vibrant tech community on one of the world's most >engaging tech sites, Slashdot.org! http://sdm.link/slashdot >___ >Bacula-users mailing list >Bacula-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/bacula-users -- Sent from my Android device with K-9 Mail. Please excuse my brevity.-- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users