Just my two cents

9Nov/18

Backup robocopy on Windows rsync on MAC

Windows robocopy based backup

create backup.cmd file with following content

Robocopy "C:\Pictures" "N:\Backup\Pictures" /FFT /MIR /COPY:DT /DCOPY:T /R:1 /W:1

Robocopy "C:\Musik" "N:\Backup\Musik" /FFT /MIR /COPY:DT /DCOPY:T /R:1 /W:1

source: own script developed in last years

Mac OS rsync based backup

rsync -rt --delete --progress ~/Documents/Picture /Volumes/NAS/backup/

used options in rsync

--delete most critical option, ensures deletion of files on destination, if destination have more files compared to source directory

--progress shows progress in the bash, quite informative if you want to see what's going on during the backup

-r transverse all subdirectories contained within the source directory and copy the subdirectories and their content to the destination directory

-t preserve timestamps of source files

more information in source: https://blog.macsales.com/45185-mac-101-learn-the-power-of-rsync-for-backup-remote-archive-systems

How to create and run script on MAC without 3rd party apps

  1. start bash
  2. open the editor vi and learn to navigate with :i ESC :w :q :wq :q!
  3. enter the code

    #! /bin/bash
    rsync -rt --delete --progress ~/Documents/Picture /Volumes/NAS/backup/

  4.  run the script in bash

    hostname:Documents user$ sh backuptest.sh

  5. or via double click but therefore you need (source)

    chmod a+x backuptest.sh + associate the sh with Terminal.app

veröffentlicht unter: Digitale Welt Kommentar schreiben
Kommentare (0) Trackbacks (0)

Zu diesem Artikel wurden noch keine Kommentare geschrieben.


Leave a comment

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

Noch keine Trackbacks.