Re: [Bacula-users] Source Forge abusive commercial ads
We had a slightly similar case between the company I work for and another company - this was google ads, and it was actually resolved with a direct request to the company that ran the ad to keep the competition fair. I do see a possibility with this kind of action here as I believe the opensource field consists of rather well informed people, and they are likely to shoot themselves in the foot with wrong information. Regards Steen Mandag 11 december 2006 17:30 skrev Kern Sibbald: On Monday 11 December 2006 17:10, Bill Moran wrote: In response to Chris Hoogendyk [EMAIL PROTECTED]: Marketing claims always tend to be a bit sketchy, and getting marketing departments to follow academic practices of source citation is rather unlikely. However, it is possible that they do have a larger installed base for historical reasons, aside from what you might see listed in download statistics from Source Forge. I guess a broader question for Source Forge would be whether they have any stated policy or practice regarding targeting ads at competitors pages within Source Forge. Unfortunately, there are rules in marketing. One of the more important rules is: Say anything that will get you customers, as long as the profit from the customers exceeds the cost of any lawsuits. (Oddly enough, if you replace customers with votes, politicians have a similar rule.) I've noticed that this practice has been getting worse in recent years, at least in the U.S. It used to be, if you had a doctor on a commercial, there was fine print at the bottom of the screen that said something like not a real doctor or otherwise identified the person as an actor with no medical training. That doesn't occur anymore. TV ads (in particular) lie outright -- they just do it in a way that their lawyers think it's unlikely they'll ever have a sizable lawsuit occur as a result. The biggest problem, IMHO, is that the American public has ceased to notice and/or do anything about it. Yes, well I can unfortunately assure you that the same tendency is much on the increase here in Europe as well. :-( I mean, to bring this back to the original topic, if Kern complains (hell, if the entire Bacula community complains) it will probably cause very little to happen aside from a polite apology and explanation of why it is this way from Sourceforge. If, however, Kern were to start publicly researching alternatives to Sourceforge, they might take notice, as Bacula is a pretty important project with a lot of draw. I'm not going to suggest that you _should_ do that, I'm just saying it might be more effective. If Sourceforge is unwilling/unable to force their advertisers to be honest, perhaps some other project hosting service would be a better fit anyway? Just so my position is clear: I don't really like having commercial ads posted all around the Bacula project page, but can accept it to a certain point. However when I see ads for Zmanda that state it is the most popular Open Source backup software in the world, I sit up and take notice. As Chris says, possibly (and I stress possibly) they have a larger installed base (though I doubt it), but they were not saying they had the largest installed base, and the best statistics on popularity of Open Source projects hosted on Source Forge is SF's own statistics, which seem to imply that Zmanda is *far* from being the most popular Open Source backup program. I'm not claiming that Bacula is the most popular as there are a good number of other programs (IMO, not in the Bacula class) that are much more popular than both Bacula and Zmanda/Amanda. Anyway, I would like to give Source Forge a chance to respond before making any decision, but if the misleading wording in the latest ads (not always there) remains, I'll definitely look into different hosting possibilities. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer
:-( Has anyone an idea? Thanks, Mario Richard Mortimer wrote: On Sat, 2006-12-09 at 12:40 +0100, Kern Sibbald wrote: If a DVD is full, it mails me that i need to insert e new one, but it does not carry on writing to it. Is there a way to let bacula try to write to a new medium every 6h or so? Or maybe bacula can check silently if a new media is in the drive? There is a Poll feature, but I don't recommend it. I think (I don't burn DVDs here so I am not 100% sure) that the proper solution is for you to do a mount command in bconsole after inserting the blank DVD. This is the same procedure that you would follow after mounting a new tape. As one who does burn DVDs I can confirm the following: a) for a blank DVD mount will only work if you have automatic labelling turned on. b) if automatic labelling is turned off then you have to manually issue label and the end of the label does a mount. This causes bacula to pick up the new volume and restart its writing. c) if you have a pre-labelled volume then mount will do the trick. Note if you are feeling really adventurous then you might be able to hook into the appropriate hotplugging framework and get that to do a bconsole mount for you. Note that I've never tried this so I don't know if it will really work. I have now turned Autolabeling on. And i run into another error i can´t figure it out: 11-Dec 18:43 linux-dir: No prior Full backup Job record found. 11-Dec 18:43 linux-dir: No prior or suitable Full backup found in catalog. Doing FULL backup. 11-Dec 18:43 linux-dir: Start Backup JobId 3, Job=Client1.2006-12-11_18.43.47 *messages 11-Dec 18:43 linux-dir: Created new Volume File-0001 in catalog. *messages 11-Dec 18:43 linux-sd: Marking Volume info in Error in Catalog. 11-Dec 18:43 linux-dir: Client1.2006-12-11_18.43.47 Error: Unable to get Media record for Volume info: ERR=sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Error getting Volume info: 1991 Catalog Request for vol=info failed: sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Job 3 canceled. 11-Dec 18:43 linux-fd: Client1.2006-12-11_18.43.47 Fatal error: job.c:1751 Bad response to Append Data command. Wanted 3000 OK data , got 3903 Error append data Any idea whats going wrong here? Where does it take ther info from? - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer
Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mario Ohnewald Sent: 12 December 2006 09:49 To: mario Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer :-( Has anyone an idea? Give us a chance! Your last message was only 16 hours ago. Anyway I had started looking at this last night so here are some thoughts. Thanks, Mario Richard Mortimer wrote: On Sat, 2006-12-09 at 12:40 +0100, Kern Sibbald wrote: If a DVD is full, it mails me that i need to insert e new one, but it does not carry on writing to it. Is there a way to let bacula try to write to a new medium every 6h or so? Or maybe bacula can check silently if a new media is in the drive? There is a Poll feature, but I don't recommend it. I think (I don't burn DVDs here so I am not 100% sure) that the proper solution is for you to do a mount command in bconsole after inserting the blank DVD. This is the same procedure that you would follow after mounting a new tape. As one who does burn DVDs I can confirm the following: a) for a blank DVD mount will only work if you have automatic labelling turned on. b) if automatic labelling is turned off then you have to manually issue label and the end of the label does a mount. This causes bacula to pick up the new volume and restart its writing. c) if you have a pre-labelled volume then mount will do the trick. Note if you are feeling really adventurous then you might be able to hook into the appropriate hotplugging framework and get that to do a bconsole mount for you. Note that I've never tried this so I don't know if it will really work. I have now turned Autolabeling on. And i run into another error i can´t figure it out: 11-Dec 18:43 linux-dir: No prior Full backup Job record found. 11-Dec 18:43 linux-dir: No prior or suitable Full backup found in catalog. Doing FULL backup. 11-Dec 18:43 linux-dir: Start Backup JobId 3, Job=Client1.2006-12-11_18.43.47 *messages 11-Dec 18:43 linux-dir: Created new Volume File-0001 in catalog. *messages 11-Dec 18:43 linux-sd: Marking Volume info in Error in Catalog. For some reason your sd has decided that it is playing with volume name info. The line above is where it is telling the director that the volume is in error and then SD reports a fatal error which ends up aborting the whole job. The interesting thing is why SD decided that it was using info. I don't know enough about the internals of volume selection etc. to work that out. Some ideas though... Did you ever create a volume named info? Have you wiped your bacula database since then and started again? The other standard question is are you running the same versions of director, sd and fd or are they different ones? 11-Dec 18:43 linux-dir: Client1.2006-12-11_18.43.47 Error: Unable to get Media record for Volume info: ERR=sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Error getting Volume info: 1991 Catalog Request for vol=info failed: sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Job 3 canceled. 11-Dec 18:43 linux-fd: Client1.2006-12-11_18.43.47 Fatal error: job.c:1751 Bad response to Append Data command. Wanted 3000 OK data , got 3903 Error append data Any idea whats going wrong here? Where does it take ther info from? - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] multitape-changer issue
Hi all, I have 3 DAT drives and I want to group this drives into one autochenger virtual device via multitape-changer script. This is my configuration: _sd.conf_ Autochanger { Name = multitape0 Device = tape1, tape2, tape3 Changer Command = /etc/bacula/scripts/multitape-changer %c %o %S %a %d Changer Device = /dev/sg0 } Device { Name = tape1 Drive Index = 0 Media Type = 4mm Archive Device = /dev/nst1 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } Device { Name = tape2 Drive Index = 1 Media Type = 4mm Archive Device = /dev/nst2 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } Device { Name = tape3 Drive Index = 2 Media Type = 4mm Archive Device = /dev/nst3 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } _dir.conf_ Storage { Name = changer0 Address = 192.168.0.20 SDPort = 9103 Password = P00io9 Device = multitape0 AutoChanger = yes Media Type = 4mm Maximum Concurrent Jobs = 1 } but: 1 - no automatic startup link has done by bacula, I have to link /dev/nstx to /dev/changer0 manually 2 - no automatic change has done by bacula 3 - look at the update slots here ... chronos bacula # bconsole Connecting to Director chronos:9101 1000 OK: chronos-dir Version: 1.38.5 (18 January 2006) Enter a period to cancel a command. *update slots Using default Catalog name=MyCatalog DB=bacula The defined Storage resources are: ... 2: drive0 3: changer0 ... Select Storage resource (1-10): 3 Connecting to Storage daemon changer0 at 192.168.0.20:9103 ... Enter autochanger drive[0]: 0 Connecting to Storage daemon changer0 at 192.168.0.20:9103 ... 3306 Issuing autochanger slots command. Device multitape0 has 0 slots. No slots in changer to scan. You have messages. Are someone experienced with this script? What's the best configuration? Thanks in advance. -- Alessio Mineni WaveGroup Via Benaco 34/b 25081 Bedizzole BS - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Use catalog-name
On Mon, 11 Dec 2006 09:40:23 +0100 Anders Trobäck [EMAIL PROTECTED] wrote: On Thu, 7 Dec 2006 10:48:44 +0100 Kern Sibbald [EMAIL PROTECTED] wrote: On Thursday 07 December 2006 10:31, Anders Trobäck wrote: Hi, new to this list so bare with me! I have some directors to monitor and on my desktop I'm using bacula-tray-monitor. In the monitor I always get an error on my directors: You must specify a use catalog-name command before continuing. What have I missed and how can I satisfy my directors? You didn't mention, but I assume from the error that you are using one of the 1.39.x beta release, and that you have two or more Catalog resources defined in your Director's conf file. The above situation (more than one catalog) presents a problem on 1.39.x becaue if it detects this condition, it asks you to select one, and at the current time, the bacula-tray-monitor doesn't expect the question, and it does not know how to answer it. Sorry for the lack of info:-] Bacula Tray Monitor : 1.38.5 Bacula Server 1.38.11 No I don't have two or more Catalog resources! More ideas? -- Microsoft is not the answer. Microsoft is the question. And 'No' is the answer! Anders Trobäck http://www.troback.com - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] restore with two autochanger using same MediaType
Hi List, we have two autochanger, booth changers using SDLT-320 as MediaType. version of bacula is 1.38.11. running a restore: The job will require the following Volumes: INC008 Run Restore job JobName:RestoreFiles Storage:Overland1 When: 2006-12-12 12:42:19 OK to run? (yes/mod/no): Volume INC008 is at Overland2/Slot 2 (the DefaultRestoreJob specifies Overland1). Why does bacula not automatically select Overland2 as Storage? When i start the job with the wrong storage, this happens: 12-Dec 12:44 backup-sd-gs: RestoreFiles.2006-12-12_12.43.17 Warning: acquire.c:146 Wrong Volume mounted on device JBGS-1 (/dev/nst0): Wanted INC008 have INC002 bacula loads Slot2 from Overland1, why? the MediaTable shows INC008 at Overland2/Slot 2 and INC002 at Overland1/Slot 2. it's a little bit useless to load slot 2 from the wrong changer. 12-Dec 12:44 backup-sd-gs: Please mount Volume INC008 on Storage Device JBGS-1 (/dev/nst0) for Job RestoreFiles.2006-12-12_12.43.17 this message is ok, i have wrongly specified Overland1 as storage in the RestoreJob, bacula did not automatically select Overland2 and so it want to have the needed volume at Overland1. Is there any way to automatically select the correct storage, when the mediatable shows the tape in one of the storages? Regards Thomas btw. i need something like a column location in the Media-Table, can i simply add one, or will this cause troubles with future bacula-updates? currently possible locations of my tapes are: Overland1/Overland2/Safe1/Safe2 and Offsite, and i want to handle this inside of bacula. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] FD service repeatedly crashing on Windows Server 2003
Hello, I have a multi machine Bacula setup. The Director and Storage Daemons are running on Linux. Two File Daemons are running on Windows Server 2003 SP1. The file daemon services on WS2K3 seem to crash on a regular basis. I setup service recovery (restart) after 15 minutes, but the end result is that the service is not running and backups are failing. The file daemon services are running under a special sys_backup user identity which is a member of the Backup Operators group and has read permissions to the folders to be backed up. Has anyone seen this? Thanks for your help in advance. - Michal -- Michal J. Winsor, ISP Information Technology Analyst Open Systems Canada Limited 1627 Broad Street Regina, SK S4P1X3 Tel.: 306.359.6725 http://www.oscl.ca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
--On Dienstag, 12. Dezember 2006 06:26 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Hi, I've noticed that when I'm backing up files with the schg flag set, and also files which are a hardlink to such a file with a schg flag the restore does not work. It looks like bacula first restores the file with the schg flag, and then tries to recreate the hardlink which failes because of the schg flag. [EMAIL PROTECTED] bacula ls -lo /mnt/files/.bacula/restores/gurke/usr/bin [...] -r-xr-xr-x 1 root wheel - 9516 May 12 2006 chkey* -r-sr-xr-x 1 root wheel schg 18140 May 12 2006 chpass* -r-xr-xr-x 1 root wheel - 72220 May 12 2006 ci* [...] -r-xr-xr-x 1 root wheel - 2006 May 12 2006 pagesize* -r-sr-xr-x 1 root wheel schg5920 May 12 2006 passwd* -r-xr-xr-x 1 root wheel - 5792 May 12 2006 paste* [...] schg, schange, simmutable set the system immutable flag (super-user only) The error messages are: 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/yppasswd - /mnt/files/.bacula/restores/gurke/usr/bin/passwd: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchsh - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchfn - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchpass - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/chsh - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/chfn - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted I'm running bacula 1.38.11 on FreeBSD 6.1-STABLE. Do you have any Idea how to fix this? If you need the configuration please tell me, but I don't think so since it looks to me like an config-independent, general, problem. Same error using bacula-1.38.2 on FreeBSD 4.11 here. Just to clarify the problem - looking at the bacula code it seems to me like the follwing happens: - fd extracts file A - d sets the attributes/flags for A - d restores file B which is a hardlink to A The last operation fals because A has the SF_IMMUTABLE (system immutable/schg) flag set. I'm speculating this will occur on all UNIX/linux/BSD platforms which have an IMMUTABLE attribute/flag for files. Can somebody confirm this? Looks like bsdtar had this problem too: http://lists.freebsd.org/pipermail/freebsd-current/2004-May/027884.html And even (Net?)BSDs restore: http://mail-index.netbsd.org/current-users/2004/10/11/0005.html The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? bacula could clear the IMMUTABLE flag for creating the hardlink and re-set it afterwards. But this is not possible if kern.securelevel 0. I guess it would be wrong to do so anyway, because it undermines the security of the system. After all files are set IMMUTABLE for a reason. Consider the fd crashes for some reason after it cleared the flag... is there an atomic way to do this? My solution for restoring a freebsd system right now is to reinstall the base system after the restore (make buildworld installworld). Regards, Georg - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Backs up Windows, but can't restore
This is Bacula 1.36.3. I have been backing up Linux servers for more than a year. I have done a test backup and restore of my Windows 2000 Pro workstation with no problems (it has, however, FAT32 partitions). As a part of planning for the future (migrating our NetWare servers to OES Linux and adding the inevitable Winders servers), my boss wants me to be sure I could back up and restore a W2K server. Well, it backs up fine -- nearly 3 GB. When I try to restore, Bacula informs me that 14,694 files have been added to the tree and my cwd is /. However, ls shows nothing at all, I can't cd to any known directory and can't mark any file for restore. The manual's caveats for Windows refer to the (ab)use of '\' and to be mindful of the treatment of NTFS naming conventions. Any ideas on where I am going worng? -- Tks n rgds, Richard White CNE6 Network Engineer Mason County, Washington 360-427-5501 [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Backs up Windows, but can't restore
In response to Richard White [EMAIL PROTECTED]: This is Bacula 1.36.3. I have been backing up Linux servers for more than a year. I have done a test backup and restore of my Windows 2000 Pro workstation with no problems (it has, however, FAT32 partitions). As a part of planning for the future (migrating our NetWare servers to OES Linux and adding the inevitable Winders servers), my boss wants me to be sure I could back up and restore a W2K server. Well, it backs up fine -- nearly 3 GB. When I try to restore, Bacula informs me that 14,694 files have been added to the tree and my cwd is /. However, ls shows nothing at all, I can't cd to any known directory and can't mark any file for restore. The manual's caveats for Windows refer to the (ab)use of '\' and to be mindful of the treatment of NTFS naming conventions. Any ideas on where I am going worng? You might want to try some things and cut/paste them into a response email so we can get a better idea of what's going on. The initial problem I had was that Bacula created a c: and d: directory at the root to handle the problem of Windows having drives. I also seem to remember the c: and d: being case-sensitive (perhaps they were C: and D:) ... anyway, that confused me at first, and I don't remember them showing up in an ls ... but I could be wrong. HTH -- Bill Moran Collaborative Fusion Inc. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] ERR=There is no valid media in th e device DVD-Writer
I have just committed a fixe to the cvs that should fix automatic tape labeling for file volumes. It may or may not fix this problem as I think they are related. On Tuesday 12 December 2006 11:38, Richard Mortimer wrote: Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mario Ohnewald Sent: 12 December 2006 09:49 To: mario Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer :-( Has anyone an idea? Give us a chance! Your last message was only 16 hours ago. Anyway I had started looking at this last night so here are some thoughts. Thanks, Mario Richard Mortimer wrote: On Sat, 2006-12-09 at 12:40 +0100, Kern Sibbald wrote: If a DVD is full, it mails me that i need to insert e new one, but it does not carry on writing to it. Is there a way to let bacula try to write to a new medium every 6h or so? Or maybe bacula can check silently if a new media is in the drive? There is a Poll feature, but I don't recommend it. I think (I don't burn DVDs here so I am not 100% sure) that the proper solution is for you to do a mount command in bconsole after inserting the blank DVD. This is the same procedure that you would follow after mounting a new tape. As one who does burn DVDs I can confirm the following: a) for a blank DVD mount will only work if you have automatic labelling turned on. b) if automatic labelling is turned off then you have to manually issue label and the end of the label does a mount. This causes bacula to pick up the new volume and restart its writing. c) if you have a pre-labelled volume then mount will do the trick. Note if you are feeling really adventurous then you might be able to hook into the appropriate hotplugging framework and get that to do a bconsole mount for you. Note that I've never tried this so I don't know if it will really work. I have now turned Autolabeling on. And i run into another error i can´t figure it out: 11-Dec 18:43 linux-dir: No prior Full backup Job record found. 11-Dec 18:43 linux-dir: No prior or suitable Full backup found in catalog. Doing FULL backup. 11-Dec 18:43 linux-dir: Start Backup JobId 3, Job=Client1.2006-12-11_18.43.47 *messages 11-Dec 18:43 linux-dir: Created new Volume File-0001 in catalog. *messages 11-Dec 18:43 linux-sd: Marking Volume info in Error in Catalog. For some reason your sd has decided that it is playing with volume name info. The line above is where it is telling the director that the volume is in error and then SD reports a fatal error which ends up aborting the whole job. The interesting thing is why SD decided that it was using info. I don't know enough about the internals of volume selection etc. to work that out. Some ideas though... Did you ever create a volume named info? Have you wiped your bacula database since then and started again? The other standard question is are you running the same versions of director, sd and fd or are they different ones? 11-Dec 18:43 linux-dir: Client1.2006-12-11_18.43.47 Error: Unable to get Media record for Volume info: ERR=sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Error getting Volume info: 1991 Catalog Request for vol=info failed: sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Job 3 canceled. 11-Dec 18:43 linux-fd: Client1.2006-12-11_18.43.47 Fatal error: job.c:1751 Bad response to Append Data command. Wanted 3000 OK data , got 3903 Error append data Any idea whats going wrong here? Where does it take ther info from? - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
On Tuesday 12 December 2006 17:02, Georg Altmann wrote: --On Dienstag, 12. Dezember 2006 06:26 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Hi, I've noticed that when I'm backing up files with the schg flag set, and also files which are a hardlink to such a file with a schg flag the restore does not work. It looks like bacula first restores the file with the schg flag, and then tries to recreate the hardlink which failes because of the schg flag. [EMAIL PROTECTED] bacula ls -lo /mnt/files/.bacula/restores/gurke/usr/bin [...] -r-xr-xr-x 1 root wheel - 9516 May 12 2006 chkey* -r-sr-xr-x 1 root wheel schg 18140 May 12 2006 chpass* -r-xr-xr-x 1 root wheel - 72220 May 12 2006 ci* [...] -r-xr-xr-x 1 root wheel - 2006 May 12 2006 pagesize* -r-sr-xr-x 1 root wheel schg5920 May 12 2006 passwd* -r-xr-xr-x 1 root wheel - 5792 May 12 2006 paste* [...] schg, schange, simmutable set the system immutable flag (super-user only) The error messages are: 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/yppasswd - /mnt/files/.bacula/restores/gurke/usr/bin/passwd: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchsh - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchfn - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/ypchpass - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/chsh - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted 10-Dec 20:31 nudel-fd: client-nudel-files-r.2006-12-10_20.28.58 Error: create_file.c:308 Could not hard link /mnt/files/.bacula/restores/gurke/usr/bin/chfn - /mnt/files/.bacula/restores/gurke/usr/bin/chpass: ERR=Operation not permitted I'm running bacula 1.38.11 on FreeBSD 6.1-STABLE. Do you have any Idea how to fix this? If you need the configuration please tell me, but I don't think so since it looks to me like an config-independent, general, problem. Same error using bacula-1.38.2 on FreeBSD 4.11 here. Just to clarify the problem - looking at the bacula code it seems to me like the follwing happens: - fd extracts file A - d sets the attributes/flags for A - d restores file B which is a hardlink to A The last operation fals because A has the SF_IMMUTABLE (system immutable/schg) flag set. I'm speculating this will occur on all UNIX/linux/BSD platforms which have an IMMUTABLE attribute/flag for files. Can somebody confirm this? Looks like bsdtar had this problem too: http://lists.freebsd.org/pipermail/freebsd-current/2004-May/027884.html And even (Net?)BSDs restore: http://mail-index.netbsd.org/current-users/2004/10/11/0005.html The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. Not only is it more complicated, but it can be very expensive. Suppose you are restoring a million hard linked files. That could mean that you need you will need to keep a list that could amount to hundreds of millions of bytes (you need to keep at least forward links, the full path and the file, as well as certain of the file attributes). If you are restoring 5 or 10 million files, it could even be worse. In addition, if you have multiple files linked together (i.e. more than 2), it would add more complication because when hitting the second linked file in the list, the real file would already be marked immutable. You can solve that by having a doubly linked list in binary order, but then the computation costs go way up. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? bacula could clear the IMMUTABLE flag for creating the hardlink and re-set it afterwards. But this is not possible if kern.securelevel 0. I guess it would be wrong to do so anyway, because it undermines the security of the system. After all files are set IMMUTABLE for a reason. Consider the fd crashes for
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Georg Altmann wrote: The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? Or what is when you just try to restore the hardlink (and you didn't knew it was a hardlink). Beside saying that reinstalling the OS should be recommended here, the IMMUTABLE flag can also be used for non-OS files too. This can't be fixed by just reinstalling the OS ;) I'd say that keeping the flags and setting them when the whole restore is done is one step in the right direction and fixes at least some of the problems. Even if it does not fix the problems 100% -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Kern Sibbald wrote: Not only is it more complicated, but it can be very expensive. Suppose you are restoring a million hard linked files. That could mean that you need you will need to keep a list that could amount to hundreds of millions of bytes (you need to keep at least forward links, the full path and the file, as well as certain of the file attributes). If you are restoring 5 or 10 million files, it could even be worse. In addition, if you have multiple files linked together (i.e. more than 2), it would add more complication because when hitting the second linked file in the list, the real file would already be marked immutable. You can solve that by having a doubly linked list in binary order, but then the computation costs go way up. Why not just keep a list of filenames which should have the IMMUTABLE flag, and apply this flag after the whole backup is done to those files. Off hand, I would say that the FreeBSD guys have worked themselves into a big hole. They have violated the rule that says that root can do anything. root can by removing the schg flag first, assuming that the right securelevel is in place. -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer
Hello, Kern Sibbald wrote: I have just committed a fixe to the cvs that should fix automatic tape labeling for file volumes. It may or may not fix this problem as I think they are related. I still get the same error. I have already wiped out the whole bacula installation and mysql database. Downloaded the latest SVN version and compiled/installed it. Still the same error: 12-Dec 19:43 linux-sd: Marking Volume info in Error in Catalog. 12-Dec 19:43 linux-dir: Client1.2006-12-12_19.43.21 Error: Unable to get Media record for Volume info: ERR=sql_get.c:950 Media record for Volume info not found. 12-Dec 19:43 linux-sd: Client1.2006-12-12_19.43.21 Fatal error: Error getting Volume info: 1991 Catalog Request for vol=info failed: sql_get.c:950 Media record for Volume info not found. 12-Dec 19:43 linux-sd: Client1.2006-12-12_19.43.21 Fatal error: Job 3 canceled. 12-Dec 19:43 linux-fd: Client1.2006-12-12_19.43.21 Fatal error: job.c:1751 Bad response to Append Data command. Wanted 3000 OK data , got 3903 Error append data On Tuesday 12 December 2006 11:38, Richard Mortimer wrote: Hi, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mario Ohnewald Sent: 12 December 2006 09:49 To: mario Cc: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] ERR=There is no valid media in the device DVD-Writer :-( Has anyone an idea? Give us a chance! Your last message was only 16 hours ago. Anyway I had started looking at this last night so here are some thoughts. Thanks, Mario Richard Mortimer wrote: On Sat, 2006-12-09 at 12:40 +0100, Kern Sibbald wrote: If a DVD is full, it mails me that i need to insert e new one, but it does not carry on writing to it. Is there a way to let bacula try to write to a new medium every 6h or so? Or maybe bacula can check silently if a new media is in the drive? There is a Poll feature, but I don't recommend it. I think (I don't burn DVDs here so I am not 100% sure) that the proper solution is for you to do a mount command in bconsole after inserting the blank DVD. This is the same procedure that you would follow after mounting a new tape. As one who does burn DVDs I can confirm the following: a) for a blank DVD mount will only work if you have automatic labelling turned on. b) if automatic labelling is turned off then you have to manually issue label and the end of the label does a mount. This causes bacula to pick up the new volume and restart its writing. c) if you have a pre-labelled volume then mount will do the trick. Note if you are feeling really adventurous then you might be able to hook into the appropriate hotplugging framework and get that to do a bconsole mount for you. Note that I've never tried this so I don't know if it will really work. I have now turned Autolabeling on. And i run into another error i can´t figure it out: 11-Dec 18:43 linux-dir: No prior Full backup Job record found. 11-Dec 18:43 linux-dir: No prior or suitable Full backup found in catalog. Doing FULL backup. 11-Dec 18:43 linux-dir: Start Backup JobId 3, Job=Client1.2006-12-11_18.43.47 *messages 11-Dec 18:43 linux-dir: Created new Volume File-0001 in catalog. *messages 11-Dec 18:43 linux-sd: Marking Volume info in Error in Catalog. For some reason your sd has decided that it is playing with volume name info. The line above is where it is telling the director that the volume is in error and then SD reports a fatal error which ends up aborting the whole job. The interesting thing is why SD decided that it was using info. I don't know enough about the internals of volume selection etc. to work that out. Some ideas though... Did you ever create a volume named info? Have you wiped your bacula database since then and started again? The other standard question is are you running the same versions of director, sd and fd or are they different ones? 11-Dec 18:43 linux-dir: Client1.2006-12-11_18.43.47 Error: Unable to get Media record for Volume info: ERR=sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Error getting Volume info: 1991 Catalog Request for vol=info failed: sql_get.c:950 Media record for Volume info not found. 11-Dec 18:43 linux-sd: Client1.2006-12-11_18.43.47 Fatal error: Job 3 canceled. 11-Dec 18:43 linux-fd: Client1.2006-12-11_18.43.47 Fatal error: job.c:1751 Bad response to Append Data command. Wanted 3000 OK data , got
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Oliver Lehmann wrote: Why not just keep a list of filenames which should have the IMMUTABLE flag, and apply this flag after the whole backup is done to those files. ^^ restore -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] multitape-changer issue
Hello, On 12/12/2006 11:59 AM, Alessio Mineni wrote: Hi all, I have 3 DAT drives and I want to group this drives into one autochenger virtual device via multitape-changer script. There was some discussion about multitape-changer recently. Use some of the list archives to see if there is relevant information for you... This is my configuration: _sd.conf_ Autochanger { Name = multitape0 Device = tape1, tape2, tape3 Changer Command = /etc/bacula/scripts/multitape-changer %c %o %S %a %d Changer Device = /dev/sg0 } I don't think this is how multitape-changer works. I never actually used it, but I think it simulates a one-drive autochanger with a number of slots equal to the number of drives you have. Device { Name = tape1 Drive Index = 0 Media Type = 4mm Archive Device = /dev/nst1 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } Device { Name = tape2 Drive Index = 1 Media Type = 4mm Archive Device = /dev/nst2 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } Device { Name = tape3 Drive Index = 2 Media Type = 4mm Archive Device = /dev/nst3 AutomaticMount = yes AlwaysOpen = no RemovableMedia = yes RandomAccess = no AutoChanger = yes LabelMedia = no } _dir.conf_ Storage { Name = changer0 Address = 192.168.0.20 SDPort = 9103 Password = P00io9 Device = multitape0 AutoChanger = yes Media Type = 4mm Maximum Concurrent Jobs = 1 } but: 1 - no automatic startup link has done by bacula, I have to link /dev/nstx to /dev/changer0 manually Sure, Bacula doesn't create device nodes for you. 2 - no automatic change has done by bacula So the autochanger setup didn't work. What does btapes test command tell you? 3 - look at the update slots here ... chronos bacula # bconsole Connecting to Director chronos:9101 1000 OK: chronos-dir Version: 1.38.5 (18 January 2006) Enter a period to cancel a command. *update slots Using default Catalog name=MyCatalog DB=bacula The defined Storage resources are: ... 2: drive0 3: changer0 ... Select Storage resource (1-10): 3 Connecting to Storage daemon changer0 at 192.168.0.20:9103 ... Enter autochanger drive[0]: 0 Connecting to Storage daemon changer0 at 192.168.0.20:9103 ... 3306 Issuing autochanger slots command. Device multitape0 has 0 slots. No slots in changer to scan. You have messages. So the multitape-changer setup is not correct. See that thread I mentioned for more information. Or hope to find someone who actually uses that... (or pay me :-) seriously, I didn't get the impression that the suggested multichanger script is easy to use). Arno Are someone experienced with this script? What's the best configuration? Thanks in advance. -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
On Tuesday 12 December 2006 19:29, Oliver Lehmann wrote: Georg Altmann wrote: The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? Or what is when you just try to restore the hardlink (and you didn't knew it was a hardlink). Beside saying that reinstalling the OS should be recommended here, the IMMUTABLE flag can also be used for non-OS files too. This can't be fixed by just reinstalling the OS ;) I'd say that keeping the flags and setting them when the whole restore is done is one step in the right direction and fixes at least some of the problems. Even if it does not fix the problems 100% It is *very* unlikely I will implement any linked list for exactly the reasons that I stated in my previous email. It seems that either I don't write very clearly or you guys are just not reading what I wrote. By the way, when restoring a file, Bacula does know whether or not it is a hardlink. If the OS permits Bacula to remove the immutable bit, then it would be possible to remove the immutable bit before hardlinking a file, and then put it back, and this without keeping any lists. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] restore with two autochanger using same MediaType
Hello, On 12/12/2006 3:25 PM, Thomas Glatthor wrote: Hi List, we have two autochanger, booth changers using SDLT-320 as MediaType. version of bacula is 1.38.11. Ok, problem understood :-) running a restore: The job will require the following Volumes: INC008 Run Restore job JobName:RestoreFiles Storage:Overland1 When: 2006-12-12 12:42:19 OK to run? (yes/mod/no): Volume INC008 is at Overland2/Slot 2 (the DefaultRestoreJob specifies Overland1). Why does bacula not automatically select Overland2 as Storage? Well, it can't :-) 1.39, as far as I know, can better handle such a situation. But in fact you found why you should really use different media types for devices that can not (easily) share media. When i start the job with the wrong storage, this happens: 12-Dec 12:44 backup-sd-gs: RestoreFiles.2006-12-12_12.43.17 Warning: acquire.c:146 Wrong Volume mounted on device JBGS-1 (/dev/nst0): Wanted INC008 have INC002 bacula loads Slot2 from Overland1, why? the MediaTable shows INC008 at Overland2/Slot 2 and INC002 at Overland1/Slot 2. it's a little bit useless to load slot 2 from the wrong changer. 12-Dec 12:44 backup-sd-gs: Please mount Volume INC008 on Storage Device JBGS-1 (/dev/nst0) for Job RestoreFiles.2006-12-12_12.43.17 this message is ok, i have wrongly specified Overland1 as storage in the RestoreJob, bacula did not automatically select Overland2 and so it want to have the needed volume at Overland1. Is there any way to automatically select the correct storage, when the mediatable shows the tape in one of the storages? Well, it might be time to ply with 1.39.wherever-we-are-today for you and test this... I'm sure Kern would be interested in the results of your tests. As far as I know, there's a better chance for this to work as it should in 1.39. Arno Regards Thomas btw. i need something like a column location in the Media-Table, can i simply add one, or will this cause troubles with future bacula-updates? currently possible locations of my tapes are: Overland1/Overland2/Safe1/Safe2 and Offsite, and i want to handle this inside of bacula. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
--On Dienstag, 12. Dezember 2006 19:40 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Kern Sibbald wrote: Not only is it more complicated, but it can be very expensive. Suppose you are restoring a million hard linked files. That could mean that you need you will need to keep a list that could amount to hundreds of millions of bytes (you need to keep at least forward links, the full path and the file, as well as certain of the file attributes). If you are restoring 5 or 10 million files, it could even be worse. In addition, if you have multiple files linked together (i.e. more than 2), it would add more complication because when hitting the second linked file in the list, the real file would already be marked immutable. You can solve that by having a doubly linked list in binary order, but then the computation costs go way up. Why not just keep a list of filenames which should have the IMMUTABLE flag, and apply this flag after the whole backup is done to those files. If you read my post carefully, that is what I (or rather the NetBSD posting) proposed... ;-) As far as I understand the problem, all you need, is a dictionary/tree of paths for storing the attributes. Then you can set the attributes after the restore is finished. I'm not saying this is easy to implement, though. Off hand, I would say that the FreeBSD guys have worked themselves into a big hole. They have violated the rule that says that root can do anything. Using linux with MAC (mandatory access control), or one of the other dozen of similar implementations, basically does the same thing. The FreeBSD problem is probably just one of many which will arise with all those policy frameworks. It appears like nobody thought of the implications for backups and especially restores this causes. Maybe a command to mark a directory tree restorable, i.e. so that all policies have no effect, would be nice. But that's just a wild guess... Regards, Georg - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Backs up Windows, but can't restore
On 12/12/2006 at 9:08 AM, in message [EMAIL PROTECTED], Bill Moran [EMAIL PROTECTED] wrote: In response to Richard White [EMAIL PROTECTED]: This is Bacula 1.36.3. I have been backing up Linux servers for more than a year. I have done a test backup and restore of my Windows 2000 Pro workstation with no problems (it has, however, FAT32 partitions). As a part of planning for the future (migrating our NetWare servers to OES Linux and adding the inevitable Winders servers), my boss wants me to be sure I could back up and restore a W2K server. Well, it backs up fine -- nearly 3 GB. When I try to restore, Bacula informs me that 14,694 files have been added to the tree and my cwd is /. However, ls shows nothing at all, I can't cd to any known directory and can't mark any file for restore. The manual's caveats for Windows refer to the (ab)use of '\' and to be mindful of the treatment of NTFS naming conventions. Any ideas on where I am going worng? You might want to try some things and cut/paste them into a response email so we can get a better idea of what's going on. The initial problem I had was that Bacula created a c: and d: directory at the root to handle the problem of Windows having drives. I also seem to remember the c: and d: being case-sensitive (perhaps they were C: and D:) ... anyway, that confused me at first, and I don't remember them showing up in an ls ... but I could be wrong. Here are the pertinent parts of bacula-dir.conf: Job { Name = Sophos Type = backup Pool = Daily Full Backup Pool = Weekend Schedule = Cycle_S Client = sophos-fd Level = differential Storage = Internal Fileset = Sophos_One Messages = Standard Priority = 10 SpoolData = yes Write Bootstrap = /bacula/bin/working/BackupCatalog.bsr } Job { Name = RestoreSophos Type = Restore Client = sophos-fd FileSet = Sophos_One Storage = Internal Pool = Daily Messages = Standard } FileSet { Name = Sophos_One Include { Options { signature = MD5 } File = c:/ } } Schedule { Name = Cycle_S Run = Differential mon-thu at 17:15 } Client { Name = sophos-fd Address = 10.1.0.5 FDPort = 9102 Catalog = MyCatalog Password = filedaemon File Retention = 30 days Job Retention = 6 months AutoPrune = yes } Here is the bacula-fd.conf on the Windows server: FileDaemon { # this is me Name = sophos-fd FDport = 9102 # where we listen for the director WorkingDirectory = c:/bacula/working Pid Directory = c:/bacula/working } The only difference between this and my exercise is that the backup job was defined as full with Weekend being the default pool. When I run Restore and choose the correct job number, it declares that there are 14,694 files, as I mentioned, but I can neither see nor mark them. -- Tks n rgds, Richard White CNE6 Network Engineer Mason County, Washington 360-427-5501 [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
--On Dienstag, 12. Dezember 2006 19:29 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Georg Altmann wrote: The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? Or what is when you just try to restore the hardlink (and you didn't knew it was a hardlink). Beside saying that reinstalling the OS should be recommended here, the IMMUTABLE flag can also be used for non-OS files too. This can't be fixed by just reinstalling the OS ;) No, of course not. I was just supposing this as a fix for your specific error messages. On the other hand, having files with the schg flag set AND hardlinks is not something that happens very often. I'd say that keeping the flags and setting them when the whole restore is done is one step in the right direction and fixes at least some of the problems. Even if it does not fix the problems 100% Just read my other post about SELinux and MAC. I don't think managing immutable flags is the responsibility of bacula or any other backup software. There should really be a possibility to make backups and restores, without having all those policies to get in your way, instead of implementing a complicated handling scheme in every backup-software. Maybe worth a bug report for FreeBSD? Cheers, Georg - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
On Tuesday 12 December 2006 21:12, Georg Altmann wrote: --On Dienstag, 12. Dezember 2006 19:29 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Georg Altmann wrote: The solution proposed is to keep file flags in a list and set them after all files have been restored, so that all hardlinks can be created. Though it is probably enough to do this for hardlinked files. Looks like this would make the restore code even more complicated. But what is the solution if you restore a file from an incremental backup which is a hardlink to an IMMUTABLE file? Or what is when you just try to restore the hardlink (and you didn't knew it was a hardlink). Beside saying that reinstalling the OS should be recommended here, the IMMUTABLE flag can also be used for non-OS files too. This can't be fixed by just reinstalling the OS ;) No, of course not. I was just supposing this as a fix for your specific error messages. On the other hand, having files with the schg flag set AND hardlinks is not something that happens very often. I'd say that keeping the flags and setting them when the whole restore is done is one step in the right direction and fixes at least some of the problems. Even if it does not fix the problems 100% Just read my other post about SELinux and MAC. I don't think managing immutable flags is the responsibility of bacula or any other backup software. There should really be a possibility to make backups and restores, without having all those policies to get in your way, instead of implementing a complicated handling scheme in every backup-software. Maybe worth a bug report for FreeBSD? Bravo Three cheers!! :-) Cheers, Georg - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Backs up Windows, but can't restore
In response to Richard White [EMAIL PROTECTED]: On 12/12/2006 at 9:08 AM, in message [EMAIL PROTECTED], Bill Moran [EMAIL PROTECTED] wrote: In response to Richard White [EMAIL PROTECTED]: This is Bacula 1.36.3. I have been backing up Linux servers for more than a year. I have done a test backup and restore of my Windows 2000 Pro workstation with no problems (it has, however, FAT32 partitions). As a part of planning for the future (migrating our NetWare servers to OES Linux and adding the inevitable Winders servers), my boss wants me to be sure I could back up and restore a W2K server. Please make an effort to fix your mail client so it doesn't mangle quoted messages. The above should look like this: On 12/12/2006 at 9:08 AM, in message [EMAIL PROTECTED], Bill Moran [EMAIL PROTECTED] wrote: In response to Richard White [EMAIL PROTECTED]: This is Bacula 1.36.3. I have been backing up Linux servers for more than a year. I have done a test backup and restore of my Windows 2000 Pro workstation with no problems (it has, however, FAT32 partitions). As a part of planning for the future (migrating our NetWare servers to OES Linux and adding the inevitable Winders servers), my boss wants me to be sure I could back up and restore a W2K server. Well, it backs up fine -- nearly 3 GB. When I try to restore, Bacula informs me that 14,694 files have been added to the tree and my cwd is /. However, ls shows nothing at all, I can't cd to any known directory and can't mark any file for restore. The manual's caveats for Windows refer to the (ab)use of '\' and to be mindful of the treatment of NTFS naming conventions. Any ideas on where I am going worng? You might want to try some things and cut/paste them into a response email so we can get a better idea of what's going on. The initial problem I had was that Bacula created a c: and d: directory at the root to handle the problem of Windows having drives. I also seem to remember the c: and d: being case-sensitive (perhaps they were C: and D:) ... anyway, that confused me at first, and I don't remember them showing up in an ls ... but I could be wrong. Here are the pertinent parts of bacula-dir.conf: Job { Name = Sophos Type = backup Pool = Daily Full Backup Pool = Weekend Schedule = Cycle_S Client = sophos-fd Level = differential Storage = Internal Fileset = Sophos_One Messages = Standard Priority = 10 SpoolData = yes Write Bootstrap = /bacula/bin/working/BackupCatalog.bsr } Job { Name = RestoreSophos Type = Restore Client = sophos-fd FileSet = Sophos_One Storage = Internal Pool = Daily Messages = Standard } FileSet { Name = Sophos_One Include { Options { signature = MD5 } File = c:/ } } Schedule { Name = Cycle_S Run = Differential mon-thu at 17:15 } Client { Name = sophos-fd Address = 10.1.0.5 FDPort = 9102 Catalog = MyCatalog Password = filedaemon File Retention = 30 days Job Retention = 6 months AutoPrune = yes } Here is the bacula-fd.conf on the Windows server: FileDaemon { # this is me Name = sophos-fd FDport = 9102 # where we listen for the director WorkingDirectory = c:/bacula/working Pid Directory = c:/bacula/working } The only difference between this and my exercise is that the backup job was defined as full with Weekend being the default pool. When I run Restore and choose the correct job number, it declares that there are 14,694 files, as I mentioned, but I can neither see nor mark them. Please show this part. The configs aren't likely to help, as it seems your config is OK. I'm suspecting that the process you're trying to go through to restore is somehow incorrect. If you show us the process, we might be able to pick out what's wrong. -- Bill Moran Collaborative Fusion Inc. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Kern Sibbald wrote: If the OS permits Bacula to remove the immutable bit, then it would be possible to remove the immutable bit before hardlinking a file, and then put it back, and this without keeping any lists. Hey, I got the same idea ;) some chflags() in the FT_LNKSAVED case in create_file... -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Georg Altmann wrote: There should really be a possibility to make backups and restores, without having all those policies to get in your way, instead of implementing a complicated handling scheme in every backup-software. Maybe worth a bug report for FreeBSD? But that would bypass the goal those flags are trying to reach, wouldn't it? -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
--On Dienstag, 12. Dezember 2006 21:24 +0100 Oliver Lehmann [EMAIL PROTECTED] wrote: Georg Altmann wrote: There should really be a possibility to make backups and restores, without having all those policies to get in your way, instead of implementing a complicated handling scheme in every backup-software. Maybe worth a bug report for FreeBSD? But that would bypass the goal those flags are trying to reach, wouldn't it? No, not really. You can clear the schg flag as root as you said your self. Why shouldn't it be possible for root to disable immutable flags for a whole tree? Obviously for securelevel 0 this should be prohibited. And for MAC you could have just another policy (JAO) for allowing this. I'm not a kernel hacker, so I don't know if this can be implemented in some reasonable manner - it's just an idea... Regards, Georg - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Removable Disk Howto revised
Attached is the latest version of the Bacula Removable Disk Howto in HTML and LaTeX formats. The attachment also includes the vchanger shell script and an example config file this time. The vcahnger script was updated to fix a bug (thanks to Michael Fung for pointing that out) and to keep the bacula-sd user as owner of files/directories when run as root. Also, a purge command was added to delete all volumes on the currently loaded magazine and then re-create them. In addition to deleteing the volume files for each slot from the magazine's filesystem, a 'delete volume' command is piped to bconsole to delete the volumes from the catalog. A 'label barcodes' command is then piped to bconsole to recreate the volumes and place them in the Scratch pool. In effect, it purges and recycles the entire magazine. Use with extreme cation! Enjoy! Josh BaculaRemovableDiskHowto-0.7.4.tgz Description: Binary data - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
(I have a patch below.) The workaround with NetBSD's restore(8) simply was to add a restore option (-M) that told restore never to set the file flags (via chflags(2)) and just write the specification for the setting the flag using mtree spec format. Then the admin could choose to run mtree later to set the flags using that generated specification. But if the file already has immutable set before any restore, you may be out of luck. Just for those who don't know about this with BSD: a security level can be set which stops even root from turning off these flags and the security level can't be lowered by root either. The only way is too reboot the computer and make sure it boots up without the security level raised (boot first into single user at physical console for example). Another option which was only mentioned very briefly in this thread is to try what FreeBSD's restore(8) does (but NetBSD does not appear to do). If the link(2) fails, then assume that maybe there is a file flag preventing this and then do (from FreeBSD's sbin/restore/utilities.c): if (stat(existing, s) == 0 s.st_flags != 0 chflags(existing, 0) == 0) { ret = link(existing, new); chflags(existing, s.st_flags); } Here is an untested patch (or at least an idea :) that should help those who don't use raised securelevel. This patch needs some debug output for both chflags introduced here. Index: src/findlib/create_file.c === RCS file: /cvsroot/bacula/bacula/src/findlib/create_file.c,v retrieving revision 1.56 diff -u -r1.56 create_file.c --- src/findlib/create_file.c 21 Nov 2006 20:14:46 - 1.56 +++ src/findlib/create_file.c 12 Dec 2006 21:08:11 - @@ -288,10 +288,32 @@ case FT_LNKSAVED: /* Hard linked, file already saved */ Dmsg2(130, Hard link %s = %s\n, attr-ofname, attr-olname); if (link(attr-olname, attr-ofname) != 0) { + +#ifdef HAVE_CHFLAGS + /* +* If using BSD user flags, maybe has a file flag +* preventing this. So attempt to disable, retry link, +* and reset flags. +* Note that BSD securelevel may prevent disabling flag. + */ + +struct stat s; + +if (stat(attr-ofname, s) == 0 s.st_flags != 0 + chflags(attr-ofname, 0) == 0) { + if (link(attr-olname, attr-ofname) != 0) { +#endif /* HAVE_CHFLAGS */ berrno be; Qmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), attr-ofname, attr-olname, be.strerror()); return CF_ERROR; +#ifdef HAVE_CHFLAGS + } + if (chflags(attr-ofname, s.st_flags) 0) { + /* add debugging here */ + } +#endif /* HAVE_CHFLAGS */ + } return CF_CREATED; #endif - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Backs up Windows, but can't restore
Please show this part. The configs aren't likely to help, as it seems your config is OK. I'm suspecting that the process you're trying to go through to restore is somehow incorrect. If you show us the process, we might be able to pick out what's wrong. OK, here goes. In bconsole, type 'restore'. Select 2 ('Enter list of comma separated JobIDs to select'). Type in the job number. At this time I see this: . . . 1 Job, 14,694 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: / $ Now I type ls and get this: c:/ I know there is a directory called sec20, so I type this: cd sec20 and get this: Invalid path given. cwd is: / And so on. It has been a couple of months since I did the testing on my W2K Pro desktop, but I know I restored files in the usual way. -- Tks n rgds, Richard White CNE6 Network Engineer Mason County, Washington 360-427-5501 [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
Hi Jeremy, I'll go and try the patch, but I'll modifiy it a bit: I would say, if the link cannot be created finally, restoring the original flags of the sourcefile should be take place in any case before returning CF_ERROR finally. Do you agree? -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] restore with two autochanger using same MediaType
Hi Arno, Arno Lehmann wrote: we have two autochanger, booth changers using SDLT-320 as MediaType. version of bacula is 1.38.11 Ok, problem understood :-) there were some recent posts on the list, that indicates that this might cause problems. but someone (maybe kern himself) wrote to the manual: Thus you should probably use the same Media Type specification for all drives where the Media can be freely interchanged. i'm running bacula with one director and two storage-daemons at two different locations (~20km far from each other and booth with an Overland Neo 2000 SDLT attached). my goal was to store the tapes cross-side and restore from the offsite-tapes using the offsite-storage, this is why i'm using on booth location the same media-types and pools. i want to put the tapes in any storage, then update slots and running the restore, without thinking about in which storage the tape is. (i can handle the problem, but my teammates will kill me, when i return from 4-week-holiday) Well, it might be time to ply with 1.39.wherever-we-are-today for you and test this... I'm sure Kern would be interested in the results of your tests. As far as I know, there's a better chance for this to work as it should in 1.39. when its only requires an update of the director, maybe i can test it, but i can't update my complete bacula installation to a beta version . Best Regards, Thomas btw. i need something like a column location in the Media-Table, can i simply add one, or will this cause troubles with future bacula-updates? currently possible locations of my tapes are: Overland1/Overland2/Safe1/Safe2 and Offsite, and i want to handle this inside of bacula. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Backs up Windows, but can't restore
In response to Richard White [EMAIL PROTECTED]: Please show this part. The configs aren't likely to help, as it seems your config is OK. I'm suspecting that the process you're trying to go through to restore is somehow incorrect. If you show us the process, we might be able to pick out what's wrong. OK, here goes. In bconsole, type 'restore'. Select 2 ('Enter list of comma separated JobIDs to select'). Type in the job number. At this time I see this: . . . 1 Job, 14,694 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: / $ Now I type ls and get this: c:/ I know there is a directory called sec20, so I type this: cd sec20 and get this: Invalid path given. cwd is: / And so on. It has been a couple of months since I did the testing on my W2K Pro desktop, but I know I restored files in the usual way. As I mentioned in my earlier response, Bacula has to work around the broken Windows concept of drives. Bacula doesn't do drives. In order to work around it, Bacula creates a directory for each drive, as you can see above in your ls, it created a c: directory in the backup volume. So, try cd c: then do another ls. An example for one of my systems: cwd is: / $ ls e:/ $ cd e: cwd is: e:/ $ ls RECYCLER/ System Volume Information/ Virtual Machines/ [...] -- Bill Moran Collaborative Fusion Inc. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FD service repeatedly crashing on Windows Server 2003
Short Answer: Don't do that. Long Answer: Bacula-fd is an interactive service (it interacts with the desktop user) it must be run using the System account. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michal Winsor Sent: Tuesday, December 12, 2006 7:48 AM To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] FD service repeatedly crashing on Windows Server 2003 Hello, I have a multi machine Bacula setup. The Director and Storage Daemons are running on Linux. Two File Daemons are running on Windows Server 2003 SP1. The file daemon services on WS2K3 seem to crash on a regular basis. I setup service recovery (restart) after 15 minutes, but the end result is that the service is not running and backups are failing. The file daemon services are running under a special sys_backup user identity which is a member of the Backup Operators group and has read permissions to the folders to be backed up. Has anyone seen this? Thanks for your help in advance. - Michal -- Michal J. Winsor, ISP Information Technology Analyst Open Systems Canada Limited 1627 Broad Street Regina, SK S4P1X3 Tel.: 306.359.6725 http://www.oscl.ca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
Here is an untested patch (or at least an idea :) that should help those who don't use raised securelevel. This patch needs some debug output for both chflags introduced here. Index: src/findlib/create_file.c I see my patch is missing a closing brace. And also it fails to return error if no file flags. If someone will use this code, I will finish it up. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] restore with two autochanger using same MediaType
Hi, On 12/12/2006 10:38 PM, Thomas Glatthor wrote: Hi Arno, Arno Lehmann wrote: we have two autochanger, booth changers using SDLT-320 as MediaType. version of bacula is 1.38.11 Ok, problem understood :-) there were some recent posts on the list, that indicates that this might cause problems. but someone (maybe kern himself) wrote to the manual: Thus you should probably use the same Media Type specification for all drives where the Media can be freely interchanged. I'd be glad if you set your mail client to wrap lines at about 70 chars, and I'm sure others would like that, too. More to the point: The term can be freely interchanged seems to be the problem. From Baculas point of view, this means that there's no penalty in using any device. In your situation, there obviously is. i'm running bacula with one director and two storage-daemons at two different locations (~20km far from each other and booth with an Overland Neo 2000 SDLT attached). my goal was to store the tapes cross-side and restore from the offsite-tapes using the offsite-storage, this is why i'm using on booth location the same media-types and pools. Ok, I understand that setup. I even see a solution for it: Set up your storage devices with different media types. When transfering tapes, change the media types of the tapes according to the location they're going to. I could come up with a simple script to do that. i want to put the tapes in any storage, then update slots and running the restore, without thinking about in which storage the tape is. (i can handle the problem, but my teammates will kill me, when i return from 4-week-holiday) They should be glad you returned :-) Well, it might be time to ply with 1.39.wherever-we-are-today for you and test this... I'm sure Kern would be interested in the results of your tests. As far as I know, there's a better chance for this to work as it should in 1.39. when its only requires an update of the director, maybe i can test it, but i can't update my complete bacula installation to a beta version . It does a require an update of DIR, SD, and catalog database schema at least - so this is not an option for you. That said, I think it's quite stable, and I understand that Kern is going to relese 1.40 this year, so you might consider and upgrade soon, anyway. Arno Best Regards, Thomas btw. i need something like a column location in the Media-Table, can i simply add one, or will this cause troubles with future bacula-updates? currently possible locations of my tapes are: Overland1/Overland2/Safe1/Safe2 and Offsite, and i want to handle this inside of bacula. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
Jeremy C. Reed wrote: Here is an untested patch (or at least an idea :) that should help those who don't use raised securelevel. This patch needs some debug output for both chflags introduced here. Index: src/findlib/create_file.c I see my patch is missing a closing brace. And also it fails to return error if no file flags. If someone will use this code, I will finish it up. I'm trying right now with the following patch. It is a bit of redundant code (error handling, flag restoring), but I think it should work... --- src/findlib/create_file.c.orig Tue May 2 16:48:16 2006 +++ src/findlib/create_file.c Tue Dec 12 22:50:22 2006 @@ -304,9 +304,42 @@ Dmsg2(130, Hard link %s = %s\n, attr-ofname, attr-olname); if (link(attr-olname, attr-ofname) != 0) { berrno be; -Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), - attr-ofname, attr-olname, be.strerror()); -return CF_ERROR; +#ifdef HAVE_CHFLAGS +struct stat s; + +/* +* If using BSD user flags, maybe has a file flag +* preventing this. So attempt to disable, retry link, +* and reset flags. +* Note that BSD securelevel may prevent disabling flag. + */ + +if (stat(attr-ofname, s) == 0 s.st_flags != 0 + chflags(attr-ofname, 0) == 0) { + if (link(attr-olname, attr-ofname) != 0) { + /* restore original file flags even when linking failed */ + if (chflags(attr-ofname, s.st_flags) 0) { + Jmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +#endif /* HAVE_CHFLAGS */ + Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), +attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +#ifdef HAVE_CHFLAGS + } + /* finally restore original file flags */ + if (chflags(attr-ofname, s.st_flags) 0) { + Jmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +} else { + Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), +attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +} +#endif /* HAVE_CHFLAGS */ + } return CF_CREATED; #endif -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] restore with two autochanger using same MediaType
Hi Arno, Ok, I understand that setup. I even see a solution for it: Set up your storage devices with different media types. When transfering tapes, change the media types of the tapes according to the location they're going to. if been thinking about that before asking the list, but that is a workaround and not a solution. a real enterprise backup system must be able to handle such a simple setup :) an easy lookup to the media-table will solve the problem to choose the right changer automatically. Regards Thomas btw: why are blocking high priority jobs on one location/changer lower priority jobs on a different location/changer? i think that the priority have to take care of clients and storages, so the jobs with different priority on different storages can run at once (order by priority and storage). (a client with priority 10 and storage Jukebox1 does not have to prevent a priority 11 job on jukebox2 from being started) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
On Tue, 12 Dec 2006, Oliver Lehmann wrote: I'll go and try the patch, but I'll modifiy it a bit: I would say, if the link cannot be created finally, restoring the original flags of the sourcefile should be take place in any case before returning CF_ERROR finally. Do you agree? Yes, that is what FreeBSD's restore does. (Even if link fails it does the chflags once more to put back the flags.) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
The patch I sent was not correct because ofname and olname where mixed up when doing the flags work. I fixed this now, and I tried restoring my /usr/bin. It now created the hardlinks, but gave me errors that the owner and times of the hardlinks are not setable (because of the same thing) How relevant is setting those two things anyway? Is it possible that a hard- link has other time stats or belongs other owner/groups as it's sourcefile? If those two atributs has to be considered for hardlinks too, a similar patch has to be applied to atrribs.c I'd say. W/o looking into it I'm not sure if there is olname defined? I'll continue testing tomorrow *yawn* --- src/findlib/create_file.c.orig Tue May 2 16:48:16 2006 +++ src/findlib/create_file.c Tue Dec 12 23:58:55 2006 @@ -304,9 +304,46 @@ Dmsg2(130, Hard link %s = %s\n, attr-ofname, attr-olname); if (link(attr-olname, attr-ofname) != 0) { berrno be; -Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), - attr-ofname, attr-olname, be.strerror()); -return CF_ERROR; +#ifdef HAVE_CHFLAGS +struct stat s; + +/* +* If using BSD user flags, maybe has a file flag +* preventing this. So attempt to disable, retry link, +* and reset flags. +* Note that BSD securelevel may prevent disabling flag. + */ + +if (stat(attr-olname, s) == 0 s.st_flags != 0) { + if (chflags(attr-olname, 0) == 0) { + if (link(attr-olname, attr-ofname) != 0) { + /* restore original file flags even when linking failed */ + if (chflags(attr-olname, s.st_flags) 0) { +Jmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +#endif /* HAVE_CHFLAGS */ + Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), + attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +#ifdef HAVE_CHFLAGS + } + /* finally restore original file flags */ + if (chflags(attr-olname, s.st_flags) 0) { + Jmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), +attr-olname, be.strerror()); + } + } else { + Jmsg2(jcr, M_ERROR, 0, _(Could not reset file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +} else { + Jmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), +attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +} +#endif /* HAVE_CHFLAGS */ + } return CF_CREATED; #endif -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
Oliver Lehmann wrote: The patch I sent was not correct because ofname and olname where mixed up when doing the flags work. I fixed this now, and I tried restoring my /usr/bin. It now created the hardlinks, but gave me errors that the owner and times of the hardlinks are not setable (because of the same thing) errormessages are: 3-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:361 Unable to set file owner /mnt/files/.bacula/restores/test/usr/bin/yppasswd: ERR=Operation not permitted 13-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:367 Unable to set file modes /mnt/files/.bacula/restores/test/usr/bin/yppasswd: ERR=Operation not permitted 13-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:377 Unable to set file times /mnt/files/.bacula/restores/test/usr/bin/yppasswd: ERR=Operation not permitted 13-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:361 Unable to set file owner /mnt/files/.bacula/restores/test/usr/bin/ypchsh: ERR=Operation not permitted 13-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:367 Unable to set file modes /mnt/files/.bacula/restores/test/usr/bin/ypchsh: ERR=Operation not permitted 13-Dec 00:03 nudel-fd: client-gurke-files-r.2006-12-13_00.00.30 Error: attribs.c:377 Unable to set file times /mnt/files/.bacula/restores/test/usr/bin/ypchsh: ERR=Operation not permitted [...] -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
On Tuesday 12 December 2006 23:01, Jeremy C. Reed wrote: Here is an untested patch (or at least an idea :) that should help those who don't use raised securelevel. This patch needs some debug output for both chflags introduced here. Index: src/findlib/create_file.c I see my patch is missing a closing brace. And also it fails to return error if no file flags. If someone will use this code, I will finish it up. Please fix it up correctly, then send it to me in the same diff format versus the current CVS, but please send it as an attachment to avoid the possibility of word wrap. I'll then take a look at putting it in the code. If you send it in the next few days, it will probably become part of 1.40.0 ... - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] restore with two autochanger using same MediaType
On Tuesday 12 December 2006 23:47, Thomas Glatthor wrote: Hi Arno, Ok, I understand that setup. I even see a solution for it: Set up your storage devices with different media types. When transfering tapes, change the media types of the tapes according to the location they're going to. if been thinking about that before asking the list, but that is a workaround and not a solution. a real enterprise backup system must be able to handle such a simple setup :) an easy lookup to the media-table will solve the problem to choose the right changer automatically. Well, 1. Bacula isn't a real enterprise backup system, so workarounds are just fine considering there is a lack of programmers. 2. I don't see that a lookup to a media table would solve anything. Some other concept is needed. Currently, in Bacula one either locks the volumes down specifying a unique MediaType, or you specify a generic type in which case Bacula assumes the volumes can be mounted on any compatible drive. Maybe I am missing something, but it seems to me that you want something where Bacula automatically figures out when you would like to transfer tapes. 3. If you want Bacula to be able to modify Media Types during an update slots command, that is possibly a solution. Regards Thomas btw: why are blocking high priority jobs on one location/changer lower priority jobs on a different location/changer? i think that the priority have to take care of clients and storages, so the jobs with different priority on different storages can run at once (order by priority and storage). (a client with priority 10 and storage Jukebox1 does not have to prevent a priority 11 job on jukebox2 from being started) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] problems with hardlinks to schg secured files on FreeBSD on restore
On Tuesday 12 December 2006 22:33, Oliver Lehmann wrote: Hi Jeremy, I'll go and try the patch, but I'll modifiy it a bit: I would say, if the link cannot be created finally, restoring the original flags of the sourcefile should be take place in any case before returning CF_ERROR finally. Do you agree? Yes, of course. I won't add code to Bacula that changes the state of a file without at least trying to put it back to what it should be in the case of a problem. -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
Kern Sibbald wrote: Please fix it up correctly, then send it to me in the same diff format versus the current CVS, but please send it as an attachment to avoid the possibility of word wrap. I'll then take a look at putting it in the code. If you send it in the next few days, it will probably become part of 1.40.0 ... I've attached 2 patches (will both apply with some offset) patch-src-findlib-create_file.c Try to unset file flags of the sourcefile when the hardlink failed. Retry to hardlink then. If the hardlink fails then again, restore the file flags of the sourcefile. If the hardlink was created w/o errors, restore the fileflags of the sourcefile. patch-src-findlib-attribs.c when restoring a symlink, use lchflags to restore the file flags defined for the symlink (new feature) when restoring a hardlink, don't call chmod, chown, utime because it is a hardlink and don't have such attributes (as far as I know, if someone with more FS-foo can step up and confirm this?). Changing this attributes will change the sourcefiles attributes which is probably not what is wanted here anyway -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/ --- ./src/findlib/attribs.c.orig Wed Dec 13 07:18:20 2006 +++ ./src/findlib/attribs.c Wed Dec 13 07:26:49 2006 @@ -43,6 +43,7 @@ #define lchown chown #endif + /*=*/ /* */ /* *** A l l S y s t e m s *** */ @@ -346,7 +347,8 @@ * For link, change owner of link using lchown, but don't * try to do a chmod as that will update the file behind it. */ - if (attr-type == FT_LNK) { + switch (attr-type) { + case FT_LNK: /* Change owner of link, not of real file */ if (lchown(attr-ofname, attr-statp.st_uid, attr-statp.st_gid) 0) { berrno be; @@ -354,7 +356,25 @@ attr-ofname, be.strerror()); ok = false; } - } else { +#ifdef HAVE_CHFLAGS + /* + * FreeBSD user flags + * + * Note, this should really be done before the utime() above, + * but if the immutable bit is set, it will make the utimes() + * fail. + */ + if (lchflags(attr-ofname, attr-statp.st_flags) 0) { + berrno be; + Jmsg2(jcr, M_ERROR, 0, _(Unable to set file flags %s: ERR=%s\n), +attr-ofname, be.strerror()); + ok = false; + } +#endif + break; + case FT_LNKSAVED: + break; + default: if (chown(attr-ofname, attr-statp.st_uid, attr-statp.st_gid) 0) { berrno be; Jmsg2(jcr, M_ERROR, 0, _(Unable to set file owner %s: ERR=%s\n), --- src/findlib/create_file.c.orig Tue May 2 16:48:16 2006 +++ src/findlib/create_file.c Tue Dec 12 23:58:55 2006 @@ -304,9 +304,46 @@ Dmsg2(130, Hard link %s = %s\n, attr-ofname, attr-olname); if (link(attr-olname, attr-ofname) != 0) { berrno be; -Qmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), - attr-ofname, attr-olname, be.strerror()); -return CF_ERROR; +#ifdef HAVE_CHFLAGS +struct stat s; + +/* +* If using BSD user flags, maybe has a file flag +* preventing this. So attempt to disable, retry link, +* and reset flags. +* Note that BSD securelevel may prevent disabling flag. + */ + +if (stat(attr-olname, s) == 0 s.st_flags != 0) { + if (chflags(attr-olname, 0) == 0) { + if (link(attr-olname, attr-ofname) != 0) { + /* restore original file flags even when linking failed */ + if (chflags(attr-olname, s.st_flags) 0) { +Qmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +#endif /* HAVE_CHFLAGS */ + Qmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), + attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +#ifdef HAVE_CHFLAGS + } + /* finally restore original file flags */ + if (chflags(attr-olname, s.st_flags) 0) { + Qmsg2(jcr, M_ERROR, 0, _(Could not restore file flags for file %s: ERR=%s\n), +attr-olname, be.strerror()); + } + } else { + Qmsg2(jcr, M_ERROR, 0, _(Could not reset file flags for file %s: ERR=%s\n), + attr-olname, be.strerror()); + } +} else { + Qmsg3(jcr, M_ERROR, 0, _(Could not hard link %s - %s: ERR=%s\n), +attr-ofname, attr-olname, be.strerror()); + return CF_ERROR; +}
Re: [Bacula-users] [Bacula-devel] problems with hardlinks to schg secured files on FreeBSD on restore
Hello, I haven't yet looked at the patches, but here are a couple of preliminary comments. I'll take a careful look at the patches later today. On Wednesday 13 December 2006 07:54, Oliver Lehmann wrote: Kern Sibbald wrote: Please fix it up correctly, then send it to me in the same diff format versus the current CVS, but please send it as an attachment to avoid the possibility of word wrap. I'll then take a look at putting it in the code. If you send it in the next few days, it will probably become part of 1.40.0 ... I've attached 2 patches (will both apply with some offset) patch-src-findlib-create_file.c Try to unset file flags of the sourcefile when the hardlink failed. Retry to hardlink then. If the hardlink fails then again, restore the file flags of the sourcefile. If the hardlink was created w/o errors, restore the fileflags of the sourcefile. OK, this sounds very good. Thanks. patch-src-findlib-attribs.c when restoring a symlink, use lchflags to restore the file flags defined for the symlink (new feature) when restoring a hardlink, don't call chmod, chown, utime because it is a hardlink and don't have such attributes (as far as I know, if someone with more FS-foo can step up and confirm this?). Changing this attributes will change the sourcefiles attributes which is probably not what is wanted here anyway I'll have to think about this a bit more. However, I don't think it is correct to skip setting the attributes. To understand hardlinks, the first thing is to realize that the name is slightly misleading. A hard link is not really a link. The data for the two files the attributes are one and the same. The situation is very different from a softlink where there is a separate directory entry that points to an existing file. Thus to properly restore a hardlink you must also reset the attributes or you could potentially end up with incorrect attributes (owner, modes, ...). - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] [Bacula-devel] problems with hardlin ks to schg secured files on FreeBSD on restore
Kern Sibbald writes: patch-src-findlib-attribs.c when restoring a symlink, use lchflags to restore the file flags defined for the symlink (new feature) when restoring a hardlink, don't call chmod, chown, utime because it is a hardlink and don't have such attributes (as far as I know, if someone with more FS-foo can step up and confirm this?). Changing this attributes will change the sourcefiles attributes which is probably not what is wanted here anyway I'll have to think about this a bit more. However, I don't think it is correct to skip setting the attributes. To understand hardlinks, the first thing is to realize that the name is slightly misleading. A hard link is not really a link. The data for the two files the attributes are one and the same. The situation is very different from a softlink where there is a separate directory entry that points to an existing file. Thus to properly restore a hardlink you must also reset the attributes or you could potentially end up with incorrect attributes (owner, modes, ...). Ok, but from my understanding setting attributes on a hardlink changes the attributes of the inode the hardlink is pointing to, like for normal files which are technically hardlinks too. So changing attributes for n objects pointing to the same inode is like changing the attributes n times for the same object or is this wrong? If you think attributes for hardlinks have to be restored as well, the fix for src/findlib/attribs.c has to be redone. I can do so but I still think ;) - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users