Backups not completing due to filename length

hoorah

Senior member
Dec 8, 2005
755
18
81
I am by no means an IT professional, but I handle the backups for my fathers one-man-band home office because he refuses to implement anything better. He has an old PC as a file server with 2 HDDs (one for use, the other as a daily backup).

I'm currently using SyncBack to backup his files from one drive to the other, but some of the files won't copy because the path name is too long. Unfortunately, windows allows him to create the extra long path anyway.

For example, if I tried to copy one folder set to another, I'd get an error that the path name is too long. However, if I created all the directories by hand one at a time, it will allow me to make a path that long.

Short of a monkey with a stick to smack him every time he creates a file name too long, I'm out of options. I tell him all the time that the backups aren't working because his paths are too long, but he insists that "he needs all the data in the paths" and never changes.

I've tried zipping the folder structure together before copying, but that won't work either for the same reason.

FWIW, I'd be fine with a solution that simply refuses to let him create paths that are too long in the first place. Thanks guys!
 

JimKiler

Diamond Member
Oct 10, 2002
3,561
206
106
What operating systems is he using? Does Vista and Win 7 even have file name limits anymore?
 

hoorah

Senior member
Dec 8, 2005
755
18
81
What operating systems is he using? Does Vista and Win 7 even have file name limits anymore?

The server is using Windows XP pro, which is the only system I touch. His laptops are Win7 and Vista.

Its strange - he doesn't have a problem creating the long pathnames, but I just can't copy them.
 

JimKiler

Diamond Member
Oct 10, 2002
3,561
206
106
maybe try another program for backup like MS synctoy 2.1 and see if you get the same issue.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Robocopy, an MS utility, can copy or sync folders with VERY long file names. I think there's a GUI available now, but the original version is command-line only and you need to read the options VERY carefully. It's a bit difficult to understand exactly how it works and how the options work.

Once you get the options down, you can schedule automatic Robocopy runs. I've used it to copy long-file-name-files that Windows Explorer choked on.

Also, as far as I know, the built-in NTBackup program will handle "illegal" file names, too, in addition to backing up "open" files that most file copy utilties will skip.

http://www.eggheadcafe.com/software/aspnet/35815948/any-disk-utilities-to-cor.aspx
 
Last edited:

taltamir

Lifer
Mar 21, 2004
13,576
6
76
The server is using Windows XP pro, which is the only system I touch. His laptops are Win7 and Vista.

Its strange - he doesn't have a problem creating the long pathnames, but I just can't copy them.

why in the world would you use an obsolete POS 10 year old OS for something so important?
At the very least use windows home server.
But ideally use opensolaris with ZFS... since that requires learning new stuff you could instead use FreeNAS for an easy and simple fileserver setup experience. both are free.
you can get osol from www.genunix.org and follow the following instructions on sharing with a windows machine http://wiki.genunix.org/wiki/index.php/Getting_Started_With_the_Solaris_CIFS_Service
and you can get freenas here http://freenas.org/freenas
 

hoorah

Senior member
Dec 8, 2005
755
18
81
why in the world would you use an obsolete POS 10 year old OS for something so important?
At the very least use windows home server.
But ideally use opensolaris with ZFS... since that requires learning new stuff you could instead use FreeNAS for an easy and simple fileserver setup experience. both are free.
you can get osol from www.genunix.org and follow the following instructions on sharing with a windows machine http://wiki.genunix.org/wiki/index.php/Getting_Started_With_the_Solaris_CIFS_Service
and you can get freenas here http://freenas.org/freenas

I've used freenas before and I like it, but without going into a ton of detail, its not going to work for his setup. As for the windows home server, yeah, I suppose that would work, but XP Pro is currently meeting all of his needs (besides the file copy problem) so its an unnecessary expense to upgrade it in addition to the downtime of the server. On top of that, I've already spent the time settiing it up, and its unlikely I will put any more time into than I already have, especially not onsite.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
in that case, just let him know that if he keeps using such long filenames then those files will NOT be backed up... and its his choice whether to use it or not. you cannot force him to back it up if he doesn't want to, and if the data isn't important enough to him to do it, why should it be to you?

see if you can set the program to display some sort of error report. I know in secondcopy (my backup solution) I can set the log to only log errors and it displays a red E if there were any errors, let him know that if he sees that to pull up the log and see what files don't go, he can fix it or he can accept those files as lost in case of a problem

or you can always CHANGE the setup.
if needed make a whole new server just for freeNAS. 300$ is a small price to pay for data safety
 
Last edited:

hoorah

Senior member
Dec 8, 2005
755
18
81
I've actually started doing that - I email him the logs and tell him that he should be okay with those files disappearing. He always says he's okay with that, but I know he's not. Its not terribly important to me, but it is my fathers business. I could just let him fail on his own, but I'd prefer to be proactive about it. If it were anyone else, I wouldn't give two s***s about their data.

A future FreeNAS solution is not out of the question. This whole setup wasn't done all that long ago, we're seeing what works and what doesn't, but we definitely need a dedicated windows box for certain things right now so the file server is incorporated into that right now.

I try to get him to hit a ceiling with him limitations and have him ask me for an upgrade and work in the changes then, rather than pushing the changes on him, because then if anything happens, its not my fault. Its a tough situation, and I would never do this for anyone other than family.
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
i didn't realize it is his business... yes that is an issue.

your fileserver, especially for backups, should NOT be used as a workstation... especially not running windows XP.
if you need a dedicated windows box then keep it as a dedicated windows box and make another computer as the dedicated file server.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
It sounds like the OP's father is using the XP only as a file server. I don't know offhand of a good way to fix the problem of the father creating excessively-long file paths. I believe that even Win7 will allow that under some circumstances. Somebody posted about that very problem here a week or two ago.

While I am a big fan of WHS, I don't think it would fix this problem per se. In fact, it'd probably be a bit worse because WHS' shared folders have a pretty long (hidden) path name in front of them. It's certainly not a good practice to create such long paths, since they could conceivably cause unexpected issues in applications.
 

hoorah

Senior member
Dec 8, 2005
755
18
81
i didn't realize it is his business... yes that is an issue.

your fileserver, especially for backups, should NOT be used as a workstation... especially not running windows XP.
if you need a dedicated windows box then keep it as a dedicated windows box and make another computer as the dedicated file server.

Its not being used as a workstation, at least not by him. It only does file serving, backups of the file serve, and backups of his and a few other laptops. Right now, the only things necessitating a windows solution are his network printers and scanners. We looked into windows home server, but decided it wasn't worth paying for the license if we weren't sure we were going to stick with this server setup.

Now, the server is working pretty well, during the next upgrade cycle I may upgrade it to WHS, or I may build a separate linux based fileserver, depending on his needs at the time.

BTW, I got the backups to work. Upgraded to the trial version of syncbackSE and they completed fine, apparently long file name backups are a feature.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
The limit is 255 characters for the total file name length including path.
I have run across it a few times with archived files that have names that are really long and they will not extract to folders like documents because windows adds users/xxx/documents to the file name and causes it to exceed 255.

One quick fix is to use something like winrar to pack the files into an archive, set it for STORE and no compression and it is as fast as copying the files.
 

JimKiler

Diamond Member
Oct 10, 2002
3,561
206
106
The link below relates to being unable to access/copy files in XP. See Cause #4, Resolutions 1 & 3 for your specific issue.

http://support.microsoft.com/kb/320081

This got me thinking, is he using NTFS or the older disk format which I cannot even remember the name of anymore since I have not used it since Win 2000 came out.

Many Windows programs expect the maximum path length to be shorter than 255 characters. Therefore, these programs only allocate enough internal storage to handle these typical paths. NTFS does not have this limit and it can hold much longer paths.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,204
126
I believe that _MAX_PATH in the W2K SDK was defined as 2048. Which, for a unicode path, is approx 1000 chars. But it can be different in every app. I think Vista/Win7 use 65536, but they still run into max path issues, or other issues such as trailing spaces in directory names, as I found out.
 

Voo

Golden Member
Feb 27, 2009
1,684
0
76
I believe that _MAX_PATH in the W2K SDK was defined as 2048. Which, for a unicode path, is approx 1000 chars. But it can be different in every app. I think Vista/Win7 use 65536, but they still run into max path issues, or other issues such as trailing spaces in directory names, as I found out.
Actually:
@stdlib.h - VS08
#define _MAX_PATH 260 /* max. length of full pathname */

And as far as I remember that has been the case for a long, long time, so I think you mix up something. NTFS allows up to 2^15 UTF-16 code words (which in most cases translates to 2^16 byte, though theoretically you could get 2^17), but iirc the only way to get that in the Windows API is to use an extended length path which has some drawbacks..

So no this has absolutely nothing to do with WinXP, that's just a programming.. whatever you want to call it. But I'd say a lot of programs out there have problems with those filenames, so you'll just have to use one that handles those correctly..
 

hoorah

Senior member
Dec 8, 2005
755
18
81
He's definitely using NTFS on both drives. Here's something else thats a bit odd with this whole thing: Like I said, I can create a folder name that long and open the files in it no problem, so its not like Windows is getting pissy about it. On the other hand, if you go deep enough into the folder structure (the folders that refuse to backup), and click "properties" on them, windows reports the file as 0 bytes used. Move it somewhere else, and the size reports correctly.

So, even if windows CAN understand extremely long pathnames, it doesn't seem to be perfect, at least in my case.

Anyway, SyncBackSE seems to handle it successfully, at least for now.

I asked my father for the $50 upgrade fee for the Pro version (since you get 5 licenses) and now he won't respond to my emails. The guy bills over $200 an hour and gets pissy over backing up his data, I swear....
 

brxndxn

Diamond Member
Apr 3, 2001
8,475
0
76
I'd just use the built-in Windows backup.. I've tried SyncToy, RoboCopy, and a bunch of other freeware utilities.. The only one that consistently makes all the backups is the built-in one..

It's frustrating.. because sometimes I'd rather just have a similar file structure copied at certain time intervals..
 

taltamir

Lifer
Mar 21, 2004
13,576
6
76
Its not being used as a workstation, at least not by him. It only does file serving, backups of the file serve, and backups of his and a few other laptops. Right now, the only things necessitating a windows solution are his network printers and scanners. We looked into windows home server, but decided it wasn't worth paying for the license if we weren't sure we were going to stick with this server setup.

Now, the server is working pretty well, during the next upgrade cycle I may upgrade it to WHS, or I may build a separate linux based fileserver, depending on his needs at the time.

BTW, I got the backups to work. Upgraded to the trial version of syncbackSE and they completed fine, apparently long file name backups are a feature.

get him a printer that can be its own server... mine does:
Brother HL-2170W

or an atom box (nettop) running winXP to be server all those devices.
 

hoorah

Senior member
Dec 8, 2005
755
18
81
I would recommend you to use (edited out in case spam) thumbsup:

Thanks for the recommendation. We've been dicking around for FOUR YEARS doing nothing until you came along and saved the day. Also, I posted earlier in the thread that I had already found a solution.