On Fri, Aug 03, 2012 at 10:53:53AM +0300, Evaggelos Balaskas wrote:
In our infrastructure we have some users that dont understand about the basics and are keep writing small descriptions for file names !
an example is below, the name is in Greek
tar: ./Desktop/ΔΗΜΗΤΡΗΣ/ΣΥΝΤΕΛΕΣΤΕΣ ΑΠΟΣΒΕΣΗΣ Νέοι συντελεστές απόσβεσεις πάγιων περιουσιακών στοιχείων Οι συντελεστές απόσβεσης, ανώτεροι και κατώτεροι που προβλέπει το ΠΔ για κάθε είδος επιχειρηματικής δραστηριότητας.htm: Cannot open: File name too long
tar: Exiting with failure status due to previous errors
I looked into this more closely and it turns out that it's the tar subprocess running *on the host* which fails. The reason is clear: it's because the host filesystem (eg. ext4) doesn't support a filename of this length. ext2/3/4 supports filenames of up to 255 bytes. However because this filename contains UTF-8 chars which (in this case) are encoded as 2 bytes each, your ~200 character filename is really ~400 bytes, and that is too long. If you switched to a different host filesystem[1] then you'd be able to do this. Or keep your backup as a tarball (ie. replace 'copy-out' with 'tar-out'), since GNU tar can store unlimited length filenames. We will probably document this issue, but I don't think this is a bug in libguestfs. Rich. [1] eg: exFAT, NTFS, reiser are the only likely candidates. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/