1

I am trying to copy my entire shares directory from one server to my current directory. Running the command:

rsync -avhP /shares .

it will copy 90% of the data to that directory but I am getting this error:

rsync: mkstemp "/mnt/L18_BACKUP/shares/AUDIT-DATA/TEMP_FROM_ROOT/.z*zMetaData.txt_TagIndexed.txt_AS_rename_AuditInfoFiles_AC.log.T1OJ1D" failed: Nos such files or directory (2)

The drive that I am copying the data to is a different windows server D: drive. It looks like there are some files with asterisks but not all of them. I am copying the data from a Unix server to a Windows server HDD.

Is there a way to ignore the characters that the system does not normally let you copy so they will copy them?

Sorry the file system is in NTFS on the windows server. I am backing up the files that are on the Unix box and cannot change the files they have to be kept as is. Also there is way to many that would have to be edited even if i could

  • 1
    curious why /mnt shows up when you indicate /shares as the source. Are you in the /mnt directory when you run the command? Is it a removable device (that potentially got removed)? – Jeff Schaller Feb 4 at 16:29
  • Do you have asterisk in name? – Tryna Learn Somethin Feb 4 at 16:36
  • 1
    What's the target filesystem type? – roaima Feb 4 at 17:47
  • @TrynaLearnSomethin A * in the name should not be an issue, on Unix systems. – Kusalananda Feb 4 at 18:19
  • You need to say what the actual filesystem in use is (it's not "Windows"). NTFS and FAT have different allowed characters, and different abilities to access things outside the norm. Are you able to rename the files on the source? Would it be OK if they were renamed on the target? – Michael Homer Feb 4 at 19:31
0

Looks like some of the files you are trying to copy have reserved characters in them and that is why it is failing the way it is.

Reference found here: https://kenfallon.com/rsync-mkstemp-failed-no-such-file-or-directory-2/

There is no real effective way to ignore a character in a filename and have the backup be useful, as the names would no longer be the same. You would be hard pressed to remember what invalid character was ignored from which files in order to restore them, especially if the one in question was deleted or otherwise removed for awhile.

  • That would depend on the target filesystem type, surely. The filename shown is legal on ext4, for example. – roaima Feb 4 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.