rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Backing up from Linux to Windows?


From: Andrew Ferguson
Subject: Re: [rdiff-backup-users] Backing up from Linux to Windows?
Date: Sun, 18 Jan 2009 12:36:46 -0500

Austin,

Well, I've got some bad news. The real solution, as described by Microsoft:
http://msdn.microsoft.com/en-us/library/aa365247.aspx

is to prepend \\?\ to every path, which will allow rdiff-backup to manipulate the paths as Unicode and use a max path length of 32k characters.

The problem is that Python's support for \\?\ prepending is still rough. If I do:

>>> os.listdir("c:\\Temp\\")
['dest', 'source', 'test', 'test-dest']
>>> os.listdir("c:\\Temp")
['dest', 'source', 'test', 'test-dest']

we see that the success doesn't depend on whether I have listed C:\Temp or C:\Temp\ as the path.

However,

>>> os.listdir("\\\\?\\c:\\Temp\\")
['dest', 'source', 'test', 'test-dest']
>>> os.listdir("\\\\?\\c:\\Temp")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect: '\\\\?\\c:\\Temp/*.*'

so, \\?\C:\Temp\ works, but \\?\C:\Temp fails. WTF?


Clearly, it's going to take some time to get all this working. The Windows API is extensively brain-damaged, and both Python and rdiff-backup require work to support these sorts of situations 100%.


For cases where a *file* has create a name/path-too-long error, rdiff-backup preserves the files in a long-filenames directory, and assigns them a shortened, numeric, name. (Much like how DOS generates fake 8.3 filenames)

In the case of your traceback below, the error happened on a directory, so rdiff-backup has no provisions for supporting it.


Andrew


On Jan 16, 2009, at 9:16 AM, Austin Roberts wrote:
I believe this is the same problem as before, this time with a directory name instead of a file.

Out of curiosity, what are you doing with excessive file names? Are you just forgetting them, or are you abbreviating them in some way that can still be restored?

Trace:

Exception '[Error 206] The filename or extension is too long: 'f:/gazelle/home/a
ustin/;077usic_;079ld/;066illy ;078icholls, ;071eoff ;087hitehorn, ;074ody ;076i
nscott, ;074ohn ;066undrick, ;076ondon ;080hilharmonic ;079rchestra, ;080eter ;0
71ordeno, ;080hil ;083palding, ;083imon ;084ownshend & ;090ak ;083tarkey'' raise
d of class '<type 'exceptions.WindowsError'>':
  File "rdiff_backup\Main.pyc", line 304, in error_check_Main
  File "rdiff_backup\Main.pyc", line 324, in Main
  File "rdiff_backup\Main.pyc", line 280, in take_action
  File "rdiff_backup\Main.pyc", line 346, in Backup
  File "rdiff_backup\backup.pyc", line 38, in Mirror
  File "rdiff_backup\backup.pyc", line 232, in patch
  File "rdiff_backup\rorpiter.pyc", line 284, in __call__
  File "rdiff_backup\backup.pyc", line 625, in start_process
  File "rdiff_backup\backup.pyc", line 653, in prepare_dir
  File "rdiff_backup\rpath.pyc", line 983, in mkdir

Traceback (most recent call last):
  File "rdiff-backup", line 30, in <module>
  File "rdiff_backup\Main.pyc", line 304, in error_check_Main
  File "rdiff_backup\Main.pyc", line 324, in Main
  File "rdiff_backup\Main.pyc", line 280, in take_action
  File "rdiff_backup\Main.pyc", line 346, in Backup
  File "rdiff_backup\backup.pyc", line 38, in Mirror
  File "rdiff_backup\backup.pyc", line 232, in patch
  File "rdiff_backup\rorpiter.pyc", line 284, in __call__
  File "rdiff_backup\backup.pyc", line 625, in start_process
  File "rdiff_backup\backup.pyc", line 653, in prepare_dir
  File "rdiff_backup\rpath.pyc", line 983, in mkdir
WindowsError: [Error 206] The filename or extension is too long: 'f:/gazelle/hom
e/austin/;077usic_;079ld/;066illy ;078icholls, ;071eoff ;087hitehorn, ;074ody ;0
76inscott, ;074ohn ;066undrick, ;076ondon ;080hilharmonic ;079rchestra, ;080eter
 ;071ordeno, ;080hil ;083palding, ;083imon ;084ownshend & ;090ak ;083tarkey'
Fatal Error: Lost connection to the remote system

Thanks again,

- Austin


On Thu, Jan 15, 2009 at 7:46 PM, Andrew Ferguson <address@hidden> wrote:

On Jan 15, 2009, at 8:20 PM, Austin Roberts wrote:

Well, I tried using the native client, Cygwin wasn't involved in any part of the transaction, but I still got the file-too-long error. This is running 1.2.5 on both systems.


Cool. Thank you very much for the stack trace. Please try this build, and see if it helps:


Rdiff-backup has some basic support for handling file-too-long errors, but it only knew to expect Unix error codes. Microsoft chose to create their own error code, instead of using the perfectly sensible ENAMETOOLONG code which other OS's use. :-)


Andrew



Stack trace:

Exception '[Error 206] The filename or extension is too long: 'f:/gazelle/rdiff-
backup-data/increments/home/austin/.cxgames/winxp/windata/;083tart;077enu.;067^5
;0693;065^5;070windows^5;070profiles^5;070;065ll^2;066;085sers^5;070;083tart^2;0
66;077enu/;080rograms/;069lectronic+;065rts/;083;080;079;082;069^;0692^84^;0652'
' raised of class '<type 'exceptions.WindowsError'>':
  File "rdiff_backup\Main.pyc", line 304, in error_check_Main
  File "rdiff_backup\Main.pyc", line 324, in Main
  File "rdiff_backup\Main.pyc", line 280, in take_action
  File "rdiff_backup\Main.pyc", line 346, in Backup
  File "rdiff_backup\backup.pyc", line 38, in Mirror
  File "rdiff_backup\backup.pyc", line 232, in patch
  File "rdiff_backup\rorpiter.pyc", line 281, in __call__
  File "rdiff_backup\backup.pyc", line 526, in fast_process
  File "rdiff_backup\longname.pyc", line 203, in get_mirror_inc_rps
  File "rdiff_backup\longname.pyc", line 189, in find_inc_pair
  File "rdiff_backup\longname.pyc", line 128, in check_new_index
  File "rdiff_backup\longname.pyc", line 111, in wrap_call
  File "rdiff_backup\longname.pyc", line 122, in make_parent
  File "rdiff_backup\rpath.pyc", line 988, in makedirs
  File "os.pyc", line 157, in makedirs

Traceback (most recent call last):
  File "rdiff-backup", line 30, in <module>
  File "rdiff_backup\Main.pyc", line 304, in error_check_Main
  File "rdiff_backup\Main.pyc", line 324, in Main
  File "rdiff_backup\Main.pyc", line 280, in take_action
  File "rdiff_backup\Main.pyc", line 346, in Backup
  File "rdiff_backup\backup.pyc", line 38, in Mirror
  File "rdiff_backup\backup.pyc", line 232, in patch
  File "rdiff_backup\rorpiter.pyc", line 281, in __call__
  File "rdiff_backup\backup.pyc", line 526, in fast_process
  File "rdiff_backup\longname.pyc", line 203, in get_mirror_inc_rps
  File "rdiff_backup\longname.pyc", line 189, in find_inc_pair
  File "rdiff_backup\longname.pyc", line 128, in check_new_index
  File "rdiff_backup\longname.pyc", line 111, in wrap_call
  File "rdiff_backup\longname.pyc", line 122, in make_parent
  File "rdiff_backup\rpath.pyc", line 988, in makedirs
  File "os.pyc", line 157, in makedirs
WindowsError: [Error 206] The filename or extension is too long: 'f:/gazelle/rdi
ff-backup-data/increments/home/austin/.cxgames/winxp/windata/;083tart;077enu.;06
7^5;0693;065^5;070windows^5;070profiles^5;070;065ll^2;066;085sers^5;070;083tart^
2;066;077enu/;080rograms/;069lectronic+;065rts/;083;080;079;082;069^;0692^84^;06
52'

Again, thanks for any help. I'm really hoping to get this working, as rdiff-backup seems to be the ideal solution for my circumstances.

On Thu, Jan 15, 2009 at 1:05 AM, Dominic <address@hidden> wrote:
Austin Roberts wrote:
Windows to Linux works fine with the native binary, Linux to Windows is where I'm having problems. Is there any way to start the native windows client as a server and back up to it? I've tried using SSH, and I can run the native Windows client (as opposed to the Cygwin version), but it complains when I try to specify the drive letter.

Tomorrow I'm going to try the BackupFromWindowsToLinux instructions, using a remote source and local destination. Hopefully I'll be able to script it so I can run a script from the Linux source and have the Windows destination initiate the rdiff-backup sequence with the native rdiff-backup binary.

If I get it working smoothly, I'll make a BackupFromLinuxToWindows page on the wiki.

- Austin

On Wed, Jan 14, 2009 at 10:45 PM, Andrew Ferguson <address@hidden <mailto:address@hidden>> wrote:


I guess you need an SSH server on the Windows machine. I had a free one installed but recently uninstalled it (as I use rdiff the more usual way: Windows -> Linux) and can't find it now. But here is another free one that looks ok: http://mobassh-en.mobatek.net/. I think port 22 would need to be open for TCP traffic, and you should make sure that the remote command (--remote-schema) contains the path to rdiff-backup.exe on the server (or that rdiff-backup.exe's location is in the Windows PATH variable). HTH

Dominic


_______________________________________________
rdiff-backup-users mailing list at address@hidden
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

_______________________________________________
rdiff-backup-users mailing list at address@hidden
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki




reply via email to

[Prev in Thread] Current Thread [Next in Thread]