Backup Users Folder with Time Machine to QNAP

bruth85
New Contributor III

So I have read through a few threads about how to setup using time Machine to backup to a QNAP for just one user folder. What I am actually looking at doing is setting up Time Machine to be pre-configured to backup the the user folder for all profiles on the computer but not actually enable the auto backup. We are only looking to backup the data when user leaves the company just incase that data is needed after the computer is re-deployed.

If I just ran the script below would that set all the settings I want but not enable the backup or is there a better way to get these settings ready and deployed to each Mac so that we can easily do the backup once the computer is returned?

!/bin/bash

Set file share path to timemachine afp (edit username and password, ip address and volume/share name)

tmutil setdestination smb://username:password@ipaddress/volumename

Exclude all System folders

tmutil addexclusion -p /Applications
tmutil addexclusion -p /Library
tmutil addexclusion -p /System

Exclude hidden root os folders

tmutil addexclusion -p /bin
tmutil addexclusion -p /cores
tmutil addexclusion -p /etc
tmutil addexclusion -p /Network
tmutil addexclusion -p /private
tmutil addexclusion -p /sbin
tmutil addexclusion -p /tmp
tmutil addexclusion -p /usr
tmutil addexclusion -p /var

exit 0

0 REPLIES 0