New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpc_fileOpen: can't open file #124
Comments
I, too get a similar error on only one of my ~100 rsync clients. Also with BackupPC 4.1.3
This error repeats for each backup, referencing the current backup path. (example above is from backup '100'. |
I get similar errors. In my case I found that all of the files BackupPC complains about are hardlinks. I think I saw a couple of hardlink related fixes in rsync 3.1.2. Maybe we should make a release of rsync-bpc 3.1.2 so the packagers can make updates? |
It looks like several people have reported this, and I'd like to get to the bottom of it. Ray and Shadow, are your files hardlinks too? |
At least in my case the files are hardlinks. What's really interesting that backuping these files worked for months and for some reason it started complaining about these files. |
On all of our Oracle Linux 6 boxes, which is pretty much just RHEL 6, /bin/ed is a hard link:
I only have one out of ~100 systems that actually trigger this
$ for j in G bpc_fileOpen: can't open file /mnt/backups/BackupPC/pc/isasp160/171/f%2f/fbin/fed (from bin/ed, 3, 0, 0)
|
It's likely that the inode is messed up somehow. Can you tell me the output from BackupPC_attribPrint:
You should see an entry for 'ed', something like this:
What output do you get for 'ed'? Next, grab the inode entry for ed (58021 in the example above) and run this command, with NNNN replaced by the inode number:
What output do you get? |
In my case I miss a lot of files within /usr/share/zoneinfo/ |
What is strange though, is that the "browse backup" webUI does show the right file, with the right timestamp and size. But when downloading I get an empty file. I'm not sure if this is a clue, but in this case it is a file that got reinstalled, got a new timestamp, but did not change content wise. I'll try to find the hardlink of this file and see how that gets backup-ed or not. |
looking further into this: The attribPrint thing works for me differently on incremental backups than on full backups. When I look at the last full backup I get: 'Havana' => { And this for inode 204798: Attrib digest is 59b2a460cc3b3fccbe502b4902a8e8cd The digest for Havana is something I recognise, that is the right md5 of the file. Havana is also not generating any xfer errors and can be downloaded correctly. Cuba does give errors and downloads as an empty file |
Craig: Definitely something up. I get an unexpected result:
The same command against another host: |
It seems that I have different cases:
G bpc_fileOpen: can't open file /var/lib/backuppc/pc/internet/169/f%2f/fusr/fshare/fterminfo/fd/fdiablo-lm (from usr/share/terminfo/d/diablo-lm, 5, 0, 2) [backuppc@server ~]$ BackupPC_attribPrint /var/lib/backuppc/pc/internet/169/f%2f/fusr/fshare/fterminfo/fd/attrib [root@internet ~]# ls -i /usr/share/terminfo/d/diablo-lm But only diablo-lm is in the XFer errors. |
I only now realise that the errors I see are about the previous backup: G bpc_fileOpen: can't open file /var/lib/BackupPC//pc/odroid-rs7/764/f%2f/fusr/fshare/fzoneinfo/fCuba (from usr/share/zoneinfo/Cuba, 3, 0, 0) is from the errorlog of backup # 765 |
Thanks for the various updates. In all cases, the bpc_fileOpen error shows that the digest length is 0 (which is obviously wrong). That means there are two issues - it shouldn't get into that state in the first place, and then it should recover in the next full backup. I'm responding to all three cases below. @Shadow4711: in your case the attrib entries for diablo-lm look correct. The entry in backup 169 has nlinks > 0, which means the inode has the correct info. For some reason it's not looking up and using the inode information. What is the entry for diablo1640-lm in 169 (which should also reference the same inode)? What happens when you run these commands:
Any of these that succeed will print the (binary) file output to stdout, so you might want to pipe into md5sum rather than splatter binary output into your terminal (although it would be good to check for any errors that might accidentally go to stdout). @jaccol: the Cuba attribute is wrong: it has an empty digest, and since nlinks == 0, the inode won't be checked, so that's why bpc_fileOpen gives an error. Also, are your backups 764 and 765 incrementals or fulls? @rfrush: is backup 171 on isasp160 an incremental? You'll need to run BackupPC_attribPrint on a full. |
765 is a full I was a bit surprised with the numbers of the backup mentioned in the errors. a previous full (#754) has the same error and here the error references the same backup. |
All three commands give the same output and hash, no errors. |
Craig- From our 'problem' system:
From a similar system without this issue:
$ /usr/local/BackupPC/bin/BackupPC_attribPrint /mnt/backups/BackupPC/pc/isasp170/186/inode/65
|
The same issue was reported in issue #123, and there is a lot of detailed information on that issue. I've debugged it and the fixes have been pushed to git. Specifically:
It would be great if you could test these fixes. Thanks for your help! |
When testing the fixes, you might need to run more than one backup to have one without error messages. In my case, the first two full backups after the update still showed |
I've released BackupPC 4.1.5, BackupPC::XS 0.57 and rsync-bpc 3.0.9.9 with these fixes. |
I know this is closed, but wanted to confirm that the fix resolved the observed issue in our environment. Like SebastianS90, I observed that it took three backups (one full, two incrementals) to make the error go away. Thanks! |
@rfrush - thanks for confirming. That's good to know. |
Hello,
since three days I get a lot of these errors (only on one client):
G bpc_fileOpen: can't open file /var/lib/backuppc/pc/monitor/41/f%2f/fusr/fshare/fterminfo/fd/fd210 (from usr/share/terminfo/d/d210, 5, 0, 0)
rsync_bpc: failed to open "/usr/share/terminfo/d/d210", continuing: No such file or directory (2)
Any ideas?
These versions are installed:
BackupPC 4.1.3
BackupPC-XS 0.56
rsync-bpc 3.0.9.8
Any advises?
Regards
Shadow4711
The text was updated successfully, but these errors were encountered: