Skip to main content
added 2 characters in body
Source Link

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

Another method for backing up files and folders on an external disk is to use rclone. Install rclone on Linux or Macos: sudo

sudo -v ; curl https://rclone.org/install.sh | sudo bash

run rclone config to get credentials from Microsoft.

backup example:

/usr/local/bin/rclone sync '/Volumes//' 'myremote:

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

Another method for backing up files and folders on an external disk is to use rclone. Install rclone on Linux or Macos: sudo -v ; curl https://rclone.org/install.sh | sudo bash

run rclone config to get credentials from Microsoft.

backup example:

/usr/local/bin/rclone sync '/Volumes//' 'myremote:

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

Another method for backing up files and folders on an external disk is to use rclone. Install rclone on Linux or Macos:

sudo -v ; curl https://rclone.org/install.sh | sudo bash

run rclone config to get credentials from Microsoft.

backup example:

/usr/local/bin/rclone sync '/Volumes//' 'myremote:

added another method
Source Link

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

Another method for backing up files and folders on an external disk is to use rclone. Install rclone on Linux or Macos: sudo -v ; curl https://rclone.org/install.sh | sudo bash

run rclone config to get credentials from Microsoft.

backup example:

/usr/local/bin/rclone sync '/Volumes//' 'myremote:

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

Another method for backing up files and folders on an external disk is to use rclone. Install rclone on Linux or Macos: sudo -v ; curl https://rclone.org/install.sh | sudo bash

run rclone config to get credentials from Microsoft.

backup example:

/usr/local/bin/rclone sync '/Volumes//' 'myremote:

added 4 characters in body
Source Link

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER) do

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"
do

do shell script tSCRIPT

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER) do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"
do shell script tSCRIPT

I found a workaround to backup files on a removable hard disk to the OneDrive cloud.

  1. The OneDrive folder is in the default location on the system disk.
  2. I created a folder 'CloudBackup' within the OneDrive folder
  3. Use rsync to backup the folder 'THISFOLDER' on the external disk 'HD_Data' to the OneDrive folder.
  4. Use Applescript to run a shell script:

property tUSERNAME : short user name of (system info)

property tSOURCEFOLDER: "/Volumes/HD_Data/THISFOLDER/"

property tDESTFOLDER : "/Users/" & tUSERNAME & "/Library/CloudStorage/OneDrive-Personal/CloudBackup"

set tSCRIPT to "rsync -a --delete-after " & (quoted form of tSOURCEFOLDER) & " " & (quoted form of tDESTFOLDER)

do shell script tSCRIPT

  1. Set the folder 'CloudBackup' to 'Free Up Space'. This tells OneDrive that after uploading to the cloud all files in the folder should not take up space on the system disk. This can be done manually in the Finder by right clicking on the folder and choose 'Free up Space' or with a script:

set tSCRIPT to "/Applications/OneDrive.App/Contents/MacOS/OneDrive /unpin /r ~/Library/CloudStorage/OneDrive-Personal/CloudBackup"

do shell script tSCRIPT

added 4 characters in body
Source Link
Loading
Source Link
Loading