SOLVED AFS share on FreeNAS needs to be moved to Server2012 R2

Status
Not open for further replies.

John@CTG

Cadet
Joined
Aug 18, 2016
Messages
5
Hello all,

As described above, I have two FreeNAS AFP shares. Due to decisions above my pay grade I need to move them to the server 2012 server. I attempted to create a CIFS share for each of the Volumes, and pull the files over to the server.
Unfortunately there are a lot of issues with the filenames as indicated by many of the folder names displaying as (SX70BK~R) random names.

Is there any free or inexpensive software, or is there any other way to automate the process of fixing all of these file names? I could probably work at changing filenames manually for 16 hours straight and still not be done.

Issue resolved! Name Mangler was well worth the 20 dollars to automate all of this. Thanks so much to nojohnny101 for leading me in the proper direction.

I first used the below Regex in Name Mangler to find restricted characters and I replaced them with _ as described in the previously posted link.
[/\\:*?"<>|]
This only found about 400 problem files.
I found that the primary issue was trailing spaces/trailing white space. The CIFS share would not properly display names for files or folders with trailing spaces. I confirmed this by fixing one of the problem folders via the AFS share.
Once I found a regex that worked (shown below-YRMV) I simply used Name Mangler to replace them with nothing.
\s+\Z
 
Last edited:

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
Make sure you do not have AFP shares and CIFS shares active at the same time referencing the same datasets.

Can you be more specific about what "a lot of issues with filenames" mean? Specifically what in the filenames is causing the problems?

There are a ton of programs that can batch rename files. You could just mount the AFP shares as you have been doing and then rename that way. I use Name Mangler. very powerful and lightweight. only for mac os x though.
 

John@CTG

Cadet
Joined
Aug 18, 2016
Messages
5
Thanks for your reply. When I view the volume through the CIFS share the names turn into the jumbled mess below.

upload_2016-8-18_12-25-36.png


Looking at the files from a Mac (I am very limited in time that I can get on these systems during work hours) most of them don't have any unacceptable characters, but I believe the filenames are too long or maybe they had trailing spaces. There are MANY MANY MANY files though, and I know I have found a couple that had the # sign, and some other characters that would not be ok in windows.

This is the post that I based my assumption that it was an issue with filenames on.
https://forums.freenas.org/index.ph...via-afp-8-char-name-displayed-via-cifs.43053/

Name Mangler is probably close to what I am looking for- but it doesn't look very simple to me. Is there a certain configuration that would help me fix all of these issues without spending a lot of time configuring?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
hmmm, I will had to admit I'm not very sure what can cause that, hopefully someone more knowledgable will come and comment.

Name Mangler is going to be your simplest option. It is very self-explanatory, you're psyching yourself out.

Can you take some screenshots of your CIFS share settings?
 

John@CTG

Cadet
Joined
Aug 18, 2016
Messages
5
Please note that the CIFS share was only added so that I could access the files and pull them over to server 2012.


upload_2016-8-18_13-1-8.png
upload_2016-8-18_13-2-42.png
 

John@CTG

Cadet
Joined
Aug 18, 2016
Messages
5
I purchased file mangler and will be running that tonight from one of the Macs. I found a great article about removing the restricted characters with regex.
https://manytricks.com/blog/?p=1782
Might you or anyone else have any wisdom on shortening filenames that are too long?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
Shortening filenames? I believe I have done that with name mangler. Are all the file long or just some?

That program should be able to handle that.
 

John@CTG

Cadet
Joined
Aug 18, 2016
Messages
5
Issue resolved! Name Mangler was well worth the 20 dollars to automate all of this. Thanks so much to nojohnny101 for leading me in the proper direction.

I first used the below Regex in Name Mangler to find restricted characters and I replaced them with _ as described in the previously posted link.
[/\\:*?"<>|]
This only found about 400 problem files.
I found that the primary issue was trailing spaces/trailing white space. The CIFS share would not properly display names for files or folders with trailing spaces. I confirmed this by fixing one of the problem folders via the AFS share.
Once I found a regex that worked (shown below-YRMV) I simply used Name Mangler to replace them with nothing.
\s+\Z
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,477
Good deal, glad to hear it worked out.

I have used that program more times than I can count, it is very straightforward but powerful in its capabilities.

Told you that you could handle it!:D
 
Last edited:
Status
Not open for further replies.
Top