Do not uninstall the OneDrive app till you have made backups
Open the Finder App and go to the menu "Go" , then Utilites
Open the Terminal App
Check to see if there an existing OneDrvie CloudStorage:
/bin/ls -hal ~/Library/CloudStorage/
You should see a folder named "OneDrive-LawrencePublicSchools"
If so, back up it with this command:
/usr/bin/rsync -aP ~/Library/CloudStorage/OneDrive-LawrencePublicSchools ~/tmp
(~/Library/CloudStorage/OneDrive-LawrencePublicSchools/ is not the same as ~/Library/CloudStorage/OneDrive-LawrencePublicSchools, the ending / changes the meaning of the backup location)
to verify how much was backup to ~/tmp, use:
/usr/bin/du -ch ~/tmp/OneDrive-LawrencePublicSchools/ | /usr/bin/grep -v -e "0B\t" | /usr/bin/sort --human-numeric-sort
Now, "Quit OneDrive" if it is still running
Now, Download a new OneDrive.pkg file from https://www.microsoft.com/en-us/microsoft-365/onedrive/download
Install the PKG file
Once the new software is installed, we need to delete the old OneDrive folder
Open the Finder.App, Go Menu, OneDrive, and select "Delete "OneDrive"..."
Open the Finder App, Go Menu, Applications and you should find a "OneDrive.app' that was modified today.
It may say "You're not signed in", select "Cancel" button
Open the OneDrive app, and click on the gear and select "Unlink Account"
Close the Login screen and open OneDrive.App again
It should fill the user account with the LPS email, hit next until you get a prompt of "Finish Setting UP"
You will need to give the new OneDrive.App permissions.
Now, wait for OneDrive.App to be done backing up the Desktop, Documents and Pictures folders of the macos user account.
Now, to restore the files from our backup:
/usr/bin/rsync -aPOmc ~/tmp/OneDrive-LawrencePublicSchools/ ~/Library/CloudStorage/OneDrive-LawrencPublicSchools/ --exclude ".DS_Store" --exclude ".Trash" --exclude "*.lnk" --exclude ".*-????-????-????-*"
Article ID: 1205
Created: November 28, 2023
Last Updated: February 15, 2024
Online URL: https://kb.lawrence.k12.ma.us/article.php?id=1205