Re: [Bacula-users] Trouble restoring backed up file
I apologize for not posting this resolution sooner, but time has been scarce lately. Most of the responses I received pointed to some sort of index problem with the bacula database. I talked with my partner and he reindexed the database and then set up a cron job to vacuum and reindex the database every night. Since then, the problem has been solved. I can now build a restore directory tree of over 100k files in only a second or two. A side benefit is that the backup job itself has been reduced from 1.5 hours to just 30 minutes or less. As a side note, this was not a migrated or upgraded installation, it was a new installation. There must be something in the initial tables or configuration that does not index properly. Once the indexes were cleaned up, everything went much more smoothly. Thanks for all your help. Mike Martin Simmons wrote: On Thu, 9 Mar 2006 08:40:25 -, Andrew Paterson [EMAIL PROTECTED] said: Yes, I've had this happen to me on at least one ocasion I beleive it ultimately amounts to the director (I think) running out of memory. I sincerely hope I'm wrong, but it looks to me like bacula builds its file tree in memory if so, then well thats just asking for trouble isnt it - I dread the days when I have to do a restore from a full backup for this very reason. Does anyone know if bacula builds its directory/file tree in memory or does it use work files as it should? How many files? Note that even at 1KB per file entry in memory, 102000 files would only requie 100MB. A common cause of slowness in restore is missing indexes in the database. __Martin Thanks Andrew R Paterson DS Ltd. Cedar Office Park Cobham Road Ferndown Dorset BH21 7SB www.ds.co.uk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Morgan Sent: 08 March 2006 8:34PM To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] Trouble restoring backed up file I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? Thanks -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Trouble restoring backed up file
On Mon, 20 Mar 2006 09:35:18 -0700, Michael Morgan [EMAIL PROTECTED] said: I apologize for not posting this resolution sooner, but time has been scarce lately. Most of the responses I received pointed to some sort of index problem with the bacula database. I talked with my partner and he reindexed the database and then set up a cron job to vacuum and reindex the database every night. Since then, the problem has been solved. I can now build a restore directory tree of over 100k files in only a second or two. A side benefit is that the backup job itself has been reduced from 1.5 hours to just 30 minutes or less. As a side note, this was not a migrated or upgraded installation, it was a new installation. There must be something in the initial tables or configuration that does not index properly. Once the indexes were cleaned up, everything went much more smoothly. That's good hear. It might be the regular vacuum and reindex cron that keeps it fast. With some versions of PostgreSQL at least, indexes become less efficient if you delete and insert lots of the rows (like Bacula does with the File table). __Martin Thanks for all your help. Mike Martin Simmons wrote: On Thu, 9 Mar 2006 08:40:25 -, Andrew Paterson [EMAIL PROTECTED] said: Yes, I've had this happen to me on at least one ocasion I beleive it ultimately amounts to the director (I think) running out of memory. I sincerely hope I'm wrong, but it looks to me like bacula builds its file tree in memory if so, then well thats just asking for trouble isnt it - I dread the days when I have to do a restore from a full backup for this very reason. Does anyone know if bacula builds its directory/file tree in memory or does it use work files as it should? How many files? Note that even at 1KB per file entry in memory, 102000 files would only requie 100MB. A common cause of slowness in restore is missing indexes in the database. __Martin Thanks Andrew R Paterson DS Ltd. Cedar Office Park Cobham Road Ferndown Dorset BH21 7SB www.ds.co.uk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Morgan Sent: 08 March 2006 8:34PM To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] Trouble restoring backed up file I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? Thanks -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users
Re: [Bacula-users] Trouble restoring backed up file
On Mon, 20 Mar 2006 22:31:28 GMT Martin Simmons [EMAIL PROTECTED] wrote: On Mon, 20 Mar 2006 09:35:18 -0700, Michael Morgan [EMAIL PROTECTED] said: I apologize for not posting this resolution sooner, but time has been scarce lately. Most of the responses I received pointed to some sort of index problem with the bacula database. I talked with my partner and he reindexed the database and then set up a cron job to vacuum and reindex the database every night. Since then, the problem has been solved. I can now build a restore directory tree of over 100k files in only a second or two. A side benefit is that the backup job itself has been reduced from 1.5 hours to just 30 minutes or less. As a side note, this was not a migrated or upgraded installation, it was a new installation. There must be something in the initial tables or configuration that does not index properly. Once the indexes were cleaned up, everything went much more smoothly. That's good hear. It might be the regular vacuum and reindex cron that keeps it fast. With some versions of PostgreSQL at least, indexes become less efficient if you delete and insert lots of the rows (like Bacula does with the File table). On a PostgreSQL database, you should be running frequent vacuums. Depending on how often you backup, you may want to run them nightly after the backup finishes. Doing a vacuum analyze should clean up the indexes and keep them nice and fast. (The situation is that PostgreSQL only updates its index statistics when told to. As the database changes, its statistics can get out of date and it can make _really_ bad decisions about fastest way to work with data) On newer versions of PostgreSQL, enable autovacuum in postgresql.conf, and PostgreSQL will monitor database activity and automatically vacuum and analyze when required. This is not always your best bet, however. If you know for a fact that the database is unused during certain periods, it makes sense to manually schedule the vacuum analyze at that time - autovacuum might kick off right in the middle of a backup run. You shouldn't have to reindex. If you find that vacuum analyze isn't enough and you still have to reindex, I suspect the PostgreSQL people would like to hear about it. -- Bill Moran Collaborative Fusion Inc. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Trouble restoring backed up file
On Thu, 09 Mar 2006 08:05:43 -0700, Michael Morgan [EMAIL PROTECTED] said: Martin Simmons wrote: How many files? Note that even at 1KB per file entry in memory, 102000 files would only requie 100MB. A common cause of slowness in restore is missing indexes in the database. So how do I tell if I am missing an index? We checked and there are quite a few indexes in the database, including file indexes. Is there a way to reindex the database? Any help would be appreciated, because the current machine is a test case. If I install this on the main system, I am backing up 5-6 times as many files. I can't use this system if it will take 2-3 hours to select the file(s) that need to be restored. Please post to the list so everyone can contribute. The File table is usually the critical one. See http://www.bacula.org/rel-manual/Catalog_Maintenance.html#SECTION000236000. __Martin --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
RE: [Bacula-users] Trouble restoring backed up file
Yes, I've had this happen to me on at least one ocasion I beleive it ultimately amounts to the director (I think) running out of memory. I sincerely hope I'm wrong, but it looks to me like bacula builds its file tree in memory if so, then well thats just asking for trouble isnt it - I dread the days when I have to do a restore from a full backup for this very reason. Does anyone know if bacula builds its directory/file tree in memory or does it use work files as it should? Thanks Andrew R Paterson DS Ltd. Cedar Office Park Cobham Road Ferndown Dorset BH21 7SB www.ds.co.uk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Morgan Sent: 08 March 2006 8:34PM To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] Trouble restoring backed up file I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? Thanks -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Trouble restoring backed up file
On Thu, 9 Mar 2006 08:40:25 -, Andrew Paterson [EMAIL PROTECTED] said: Yes, I've had this happen to me on at least one ocasion I beleive it ultimately amounts to the director (I think) running out of memory. I sincerely hope I'm wrong, but it looks to me like bacula builds its file tree in memory if so, then well thats just asking for trouble isnt it - I dread the days when I have to do a restore from a full backup for this very reason. Does anyone know if bacula builds its directory/file tree in memory or does it use work files as it should? How many files? Note that even at 1KB per file entry in memory, 102000 files would only requie 100MB. A common cause of slowness in restore is missing indexes in the database. __Martin Thanks Andrew R Paterson DS Ltd. Cedar Office Park Cobham Road Ferndown Dorset BH21 7SB www.ds.co.uk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Morgan Sent: 08 March 2006 8:34PM To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] Trouble restoring backed up file I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? Thanks -- Michael L. Morgan Director of Operations Iodynamics, LLC (435) 760-1046 --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Trouble restoring backed up file
On 8 Mar 2006 at 13:33, Michael Morgan wrote: I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? What version? -- Dan Langille : Software Developer looking for work my resume: http://www.freebsddiary.org/dan_langille.php --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Trouble restoring backed up file
--- Michael Morgan [EMAIL PROTECTED] wrote: I am trying to restore a single file or directory from a full backup job. However, when I specify the jobid in the console, it just sits there telling me it is building the file tree. I tried it from a smaller, incremental job, and it seemed to build the tree ok, but this large full backup just doesn't happen. The backup job is 102k file count and approximately 18GB. How long should I expect this to take to build the file tree? This can be a very long time (1 hour or more) if you are using an older version of bacula or do not have the indexes setup correctly in a more recent version. John --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users