Data

Cloud migration and data migration

Cloud storage is an ideal principle for many small businesses to make data files available. All employees can access them from anywhere. Only an internet connection and an account are required. Perfect, therefore, for startups.

Existing companies wishing to make the switch to cloud storage also have this option. Cloud migration is a procedure in which data is moved from a single location, often from a company’s local server, to the servers of a public cloud provider. However, this migration does require the necessary preparation. This article discusses the potential obstacles.

Company needs

  • Migration of data files from a local Mac Mini on macOS 10.12 Sierra to a cloud platform (Microsoft SharePoint). The amount of data is approximately 200 GB.
  • Existing folder and file naming differs from Microsoft naming.
  • Files must remain accessible to employees during the migration process (= subject to change). Detection of additions and changes is required.
  • After a full migration, shut down the existing server and switch employees to the new storage location.

Over the years, many forbidden characters can sneak into folders and files. This also happens through users who save email locally on the Apple server via drag & drop. In addition to the well-known forbidden characters such as those listed here …

  • Tilde (~)
  • Number sign (#)
  • Percent (%)
  • Ampersand (&)
  • Asterisk (*)
  • Braces ({ })
  • Backslash ()
  • Colon (:)
  • Angle brackets (< >)
  • Question mark (?)
  • Slash (/)
  • Plus sign (+)
  • Pipe (|)
  • Quotation mark (“)

… one must also not incorrectly use allowed characters. For example, a period followed by a period in a file name or folder causes a conflict. Even a file that begins or ends with a space is not allowed. A complete overview of the restrictions for OneDrive and SharePoint can be found on this Microsoft webpage:

Manually checking the correct naming in thousands of files and hundreds of folders is an insurmountable task. Automation is therefore necessary. To meet this need, there are (free) tools available that can take care of this. I will mention two of them here:

I used Transnomino myself. Highly recommended. Transnomino has legacy versions for older macOS starting from version 10.11.

These tools offer features such as Find and Replace, Regular Expressions, Prefix and Suffix, Numbering, Trim, Case Changes, as well as ‘Windows Compatibility’. ‘Windows Compatibility’ is particularly important here as preparation for successfully executing a migration to Microsoft SharePoint.

I only discovered this compatibility feature later, actually while writing this article. Previously, during an initial run on the shared folder, I had used a ‘Regular Expression’ in which I had included the majority of forbidden characters to be replaced by a hyphen (-). The disadvantage was that allowed characters (period and space) were not replaced. However, a folder containing a period or a file starting with a space is not acceptable to Microsoft storage systems either. So, it didn’t work out perfectly.

After which copying the shared folder to a OneDrive folder irrevocably indicated that upload conflicts existed. This had to be confirmed manually, after which OneDrive did automatically proceed to modify several hundred files and folders.

Using Transnomino is simple via the GUI. It features Drag & Drop functionality, where files and folders to be renamed are simply dragged into the input field. Select Conversion beforehand, choose Full Path as the location, and select Windows Compatibility as the convert option. The software displays the before and after on the screen. This allows you to see what the original (incorrect) and new naming will look like. Confirm the setting with Rename and trust the process.

Phase one of compatible naming was hereby completed.

Phase two of the migration involved transferring the shared folder on the Mac Mini ‘server’ to Microsoft SharePoint. Here, macOS 10.12 Sierra presented a limitation. Microsoft no longer has suitable versions of OneDrive for this old operating system. So, a workaround was necessary: ​​using an iMac with access to OneDrive and an SMB connection to the Mac Mini. Drag-and-drop is not recommended here because proper control or follow-up is not possible. A synchronization tool is therefore required. There are free (open source) tools available for this as well.

I used FreeFileSync 14.3 for macOS.

The source location and the destination location are selected via the GUI.
At startup, the software creates an inventory of the thousands of files and hundreds of folders. After this initial check, an overview is provided of the size of the target folders and files, as well as the total amount of data to be transferred.
And it immediately becomes apparent here that frequent synchronization of source and target is important. Uploading 100 to 200 GB to a cloud server takes quite a bit of time. During this time span, local files may be modified, in use, or added. Synchronization in different phases is therefore necessary.
And this is where things went wrong. The process was interrupted due to power saving and/or a macOS update on the iMac. Upon resuming the next day, it went wrong twice: only files were transferred without transferring the folder structure.

Alternative … A copy to the iMac in an alternative folder. Everything is fine with this.
However, this provided by no means a solution to the need to be able to perform regular synchronization. Especially since it was determined during the upload to SharePoint that the naming was not Microsoft compliant.

Phase one therefore needs to be reconsidered (correct 100% Microsoft SharePoint compatible naming). So, today it was established that Transnomino offers this possibility via the ‘Windows Compatibility’ conversion option. Phase two: uploading to SharePoint must be possible with the option for continuous synchronization.

In the world of Microsoft, there is a suitable tool for that: the SharePoint Migration Tool (SPMT).

There is a limitation to this, however. The software is only available for Windows and not macOS. An alternative in a purely Apple environment is to include a Windows 11 workstation with an SMB link to the shared folder on the Mac Mini. Or look for suitable software that is compatible with Apple macOS.

And with Movebot, that possibility seems to exist.

One of the features is ‘Filename Sanitization’, a process that removes illegal characters from folders and files to comply with Microsoft requirements.
There is a free trial version with a data limit of 50 GB. I have not yet been able to verify whether a compatible version exists for the old macOS Sierra. So, it might need to be run via an iMac macOS Sequoia. To be continued.

Daniël Van Dromme
ICT consultant bij  | Personal Website

I am a Systems Integrator and Infrastructure Architect with more than 28 years of professional experience. My opinion is my own opinion and the vision of Peritus Consult, not the opinion of my employer Lab9 Pro.