Invalid Zip from webserver?

Hi all,

I needed to restore a documents folder for an employee here at work, so I went on the webserver and downloaded the folder - which came as a zip as I expected. Once I double clicked on it, Windows was claiming the zip was invalid. If I tried right-click / extract it was claiming that I needed to add files to the zip before I could extract. The UrBackup server is Running linux. The client is Windows 7. The web interface downloads ~480MB (the zip file is like 478MB) - I don’t know if that’s everything or not since I can’t open the zip.

Any tips? I don’t want to SAMBA export any shares, what should I look at in terms of server logs that might hint at the problem? UrBackup server is version 2.0.30

ps - I’m also seeing a lot of errors similar to:
2016-07-29 08:12:28: ERROR: Error replaying symlink journal: Could create link at “/media/storage/urbackup/ins-cos-1/160720-0848/Users/Default” to “/media/storage/urbackup/ins-cos-1/.directory_pool/yd/ydtBmtW7cv14690302381440242021”

Not just that one item, my debug log has a lot of these types of entries

Could you run a du -h -L to find out how big the folder to be downloaded is?

The relevant log file is /var/log/urbackup.log , the zip file download does not log much, though.

Thanks for the hint. Those will be fixed with the next server version. Meanwhile they don’t corrupt anything.

Total uncompressed folder size is 1.3Gigs

And you’re right - there really wasn’t much of anything about the zip in the log…

Glad to know nothing is corrupted - was kinda nervous when I saw them.

I should mention I have also tried 2.0.31 (since it showed that the update was available, figured it couldn’t hurt to try)

The next step would be looking at the zip file with a hex editor. If you can reproduce it with a smaller folder that would make it easier.

Yeah, that’s gonna be the fun part - this user had to be moved to a different workstation - I was able to restore her desktop folder (zip worked fine), but just not the documents :frowning: I may have to randomly try other folders until I can find a smaller one…

Ok, I’ve located the issue, it’s definitely server side, but not sure how a permanent fix could be made.

Here’s what I did:
I downloaded the “broken” zip to another computer that had more robust archive extraction tools. I was able to extract the archive and see what files were and weren’t compressed. The last file it compressed was:

motto.docx

This was a normal docx file with no issues

The next file was/is the link file that Microsoft generates for backward compatibility for My Music (linking to c:\users<USERNAME>\Music

The official link that is backed up is:

lrwxrwxrwx 1 urbackup urbackup 33 Jul 28 18:50 My Music -> …/…/…/Users/kima/Music

This is where it all goes wrong. It and the next two links (My Pictures and My Videos) are symbolic links based on the path with its existence on Windows. The path does not exist in that structure when it’s backed up on Linux.

When I tried:

ls …/…/…/Users

The result was:

ls: cannot access …/…/…/Users: No such file or directory

I went ahead and removed those three folders from that one users Documents folder and went to try to download the zip again, and it downloaded a 1.29Gig zip file.

So, with how UrBackup handles the symbolic links within windows appears to cause the zip functionality at the web interface download to break the instant one of those broken files show up.

So, can I add an exclusion like:
;\Documents\My/ Music;\Documents\My/ Videos;*\Documents\My/ Pictures

Will that work? It doesn’t solve my problem of having to go through all of my existing backup to remove those folders, but would it stop new backups from saving those symbolic link files?

Those links should be perfectly fine. You can test that by cd into the link. You should restore folders containing symlinks with the client. I’ll have a look at zipfiles + symlinks.

It’s broken - trust me - the links don’t work. They are red reflecting a broken sym link…

Well, then you disabled following symlinks and/or excluded the folders, otherwise you’ll have to give us more details

I’m not sure how much more I can explain this - the links are wrong. They are not disabled, they are just wrong. They are backed up sym links from a windows machine that the link references a location that doesn’t exist on a linux machine - the path doesn’t exist.

Here - a screenshot is worth a thousand words in this case I think:

When you try to CD to it - since it’s a broken link, it doesn’t work. See:
root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kima/Documents# cd My\ Music
-su: cd: My Music: No such file or directory

and here’s another example of broken links:

There are plenty of functional links, and following paths works fine for links that exist properly. This isn’t a matter of symlinks not being followed - it’s a matter of symlinks specific to windows that are copied as is over to linux where the paths don’t match up, causing broken links, which causes the zip functionality to break - this has nothing to do with symlinks within apache (which follow symlinks is enabled)

Obviously this works for e.g. for my Windows machines and is not broken in general.

Thanks for giving more details… now the question is where it gets the path component kim.atkinson instead of the correct kim.

They are not copied as is. Then they would start with C:\\

technically the correct is kim.atkinson, I was concealing her name in the posts before for privacy reasons, but there was no way to do that with the screenshot to explain the situation…

And I understand it’s not copied verbatim - plus a symbolic link to C:… wouldn’t make much sense in Linux anyway. But that link is a relative path, not a full path anyway.

So

/media/storage/urbackup/ins-cos-1/current/Users/kima/Documents/My Music points to ../../../Users/Music which is
/media/storage/urbackup/ins-cos-1/current/Users/kima/Music.

Does /media/storage/urbackup/ins-cos-1/current/Users/kima/Music exist? And if not, why not?

Music does exist, I can get to it just fine, except through that symlink which seems to be broken. You can see the folder here:

and I can access it normally if I change into it…
root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kim.atkinson# ls -l | grep Mu
drwxr-x— 2 urbackup urbackup 4096 Jul 29 07:05 Music
root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kim.atkinson#

It’s an empty folder (we don’t back up music, videos or pictures (except for a few specific work stations) to conserve space)

In theory that link should work, but I’m not seeing a good reason why it doesn’t.

Sorry if I seem grumpy - I know you’re offering good information, it’s been a crappy Friday so far and I’m a bit more snippy than I should be.

Update note: I had some ideas, none of which panned out. I don’t quite understand why if I do: ls …/…/…/Users/kim.atkinson/Music I get no such file or directory, but if I do a cd …/…/…/Users/kim.atkinson/Music it works fine. Especially since if I do a ls …/…/…/ I get:

160317-1231 160721-0520 160722-0342 160723-0203 160724-0022 160724-2241 160725-2101 160726-1923 160727-1758 160728-1643
160416-1237 160721-0721 160722-0544 160723-0405 160724-0224 160725-0043 160725-2303 160726-2125 160727-2001 160728-1847
160516-1244 160721-0922 160722-0747 160723-0606 160724-0426 160725-0245 160726-0104 160726-2327 160727-2202 160728-2051
160615-1247 160721-1126 160722-0949 160723-0808 160724-0628 160725-0447 160726-0307 160727-0128 160728-0004 160728-2253
160715-1253 160721-1329 160722-1151 160723-1010 160724-0829 160725-0649 160726-0509 160727-0331 160728-0205 160729-0055
160720-1707 160721-1531 160722-1353 160723-1212 160724-1031 160725-0850 160726-0711 160727-0532 160728-0407 160729-0257
160720-1910 160721-1733 160722-1554 160723-1414 160724-1233 160725-1052 160726-0913 160727-0734 160728-0608 160729-0500
160720-2113 160721-1935 160722-1756 160723-1615 160724-1434 160725-1254 160726-1115 160727-0935 160728-0810 160729-0703
160720-2315 160721-2137 160722-1958 160723-1817 160724-1636 160725-1456 160726-1317 160727-1138 160728-1012 current
160721-0116 160721-2339 160722-2159 160723-2019 160724-1838 160725-1657 160726-1520 160727-1341 160728-1216
160721-0318 160722-0140 160723-0001 160723-2220 160724-2040 160725-1859 160726-1721 160727-1544 160728-1419

So why would changing the directories work, yet ls seems to take a different path?? see:

root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kim.atkinson/Documents# ls …/…/…/
160317-1231 160721-0520 160722-0342 160723-0203 160724-0022 160724-2241 160725-2101 160726-1923 160727-1758 160728-1643
160416-1237 160721-0721 160722-0544 160723-0405 160724-0224 160725-0043 160725-2303 160726-2125 160727-2001 160728-1847
160516-1244 160721-0922 160722-0747 160723-0606 160724-0426 160725-0245 160726-0104 160726-2327 160727-2202 160728-2051
160615-1247 160721-1126 160722-0949 160723-0808 160724-0628 160725-0447 160726-0307 160727-0128 160728-0004 160728-2253
160715-1253 160721-1329 160722-1151 160723-1010 160724-0829 160725-0649 160726-0509 160727-0331 160728-0205 160729-0055
160720-1707 160721-1531 160722-1353 160723-1212 160724-1031 160725-0850 160726-0711 160727-0532 160728-0407 160729-0257
160720-1910 160721-1733 160722-1554 160723-1414 160724-1233 160725-1052 160726-0913 160727-0734 160728-0608 160729-0500
160720-2113 160721-1935 160722-1756 160723-1615 160724-1434 160725-1254 160726-1115 160727-0935 160728-0810 160729-0703
160720-2315 160721-2137 160722-1958 160723-1817 160724-1636 160725-1456 160726-1317 160727-1138 160728-1012 current
160721-0116 160721-2339 160722-2159 160723-2019 160724-1838 160725-1657 160726-1520 160727-1341 160728-1216
160721-0318 160722-0140 160723-0001 160723-2220 160724-2040 160725-1859 160726-1721 160727-1544 160728-1419
root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kim.atkinson/Documents# cd …/…/…/Users/kim.atkinson/Music
root@backserv:/media/storage/urbackup/ins-cos-1/current/Users/kim.atkinson/Music#

I’m sure this is all tied to where the problem lies, but I can’t really explain any better how it all works due to the way all of the linking takes place for incremental / full backups.

Ok, that’s just weird. Especially that cd ../../../Users/kim.atkinson/Music works but cd My\ Music doesn’t. Is one of the folders in the path Users/kim.atkinson/Music or Users/kim.atkinson/Documents a directory symlink? If yes that must be the reason…

Ok, I originally figured I’d have to wait until I got back to my office to check, but conveniently - I had posted the picture of the ins-cos-1/current/kim.atkinson folder. Looks like, as it was an incremental backup, Documents is a symbolic link to another location. So if that’s causing the break, wouldn’t that mean that it could affect any linked folder at any time if during incremental or de-dup detection on full that the way the links are assembled it could cause a broken sym link to follow?

Yeah, seems it needs to adjust the symlink paths on Linux/FreeBSD when it moves the folder to .directory_links.

So, I guess the ultimate question - is there something I can do to fix this, or is it something in a future patch of urbackup? Also curious - could some of this be related to those errors I referenced earlier?

Yes, this will be patched. And the ZIP download needs to ignore broken symlinks anyway, as they can occur for other reasons.

The first issue is something different.

Well, let me know if you need any other information that might help you - at least I know I can get to the files I need - just might need to dig a little :wink: