Skip to content

rustymyers/BackupRestore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BackupRestore Scripts
Current Version - 0.7.6

## Intro ##
See post here: http://rustyisageek.blogspot.com/p/backuprestore-scripts.html

## Please add your feature requests and code to GitHub or by emailing me! I still need to get alternate backup methods working. Rsync and ditto have been failing in my tests. ##

## Known Issues ##

1)
-e flag to exclude users has been know to not work properly. If used, you must specify all of the default options ( "shared" "guest" "deleted users" ), as well as your additions!

2)
The method to determine the internal drive has recently changed, due mainly to CoreStorage Fusion volumes. Always test the script before using it in production! Please file a bug or email me with any issues.

## Basic Usage ##


Usage: DS_BACKUP_DATA [ -e "guest admin shared" ] [ -v "/Volumes/Macintosh HD" ] [ -u /Users ] [ -d "/Volumes/External Drive/" ] [ -t tar ]
Variables can be set in DeployStudio variables window when running script.
BackupRestore Variables:
-q Unique Identifier 
		Should be left empty. Can be used to specify your 
		own identifier for backups. Default is Serial Number.
-c Remove User Cache. 
		Will delete the Users /Library/Cache
 		folder before backing up the data.
-e Users to Skip - Doesn't Work.
        Must use quotes for multiple users
        Default is "guest" and "shared"
            You must specify "guest" and
            "shared" if your use the argument
-v Target volume
        Specify full path to mount point of volume
        Default is the internal volume
        e.g. /Volumes/Macintosh HD
-u User path on target
        Set to path of users on volume
        Default is /Users
-d Backup destination
        Specify full path to the backup volume
        Default is /tmp/DSNetworkRepository
-t Backup tool (tar) - Still working on this one!
        Select backup software, Default tar
        tar = Use tar with gzip to backup.
        ditto and rsync NOT WORKING, yet!
        -removed- ditto = Use ditto with gzip to backup
        -removed- rsync = Use rsync to backup
-n New backup
        Create a new archive each run by adding a date to end of name. (Can't be restored)
-p Prompt for Unique ID (BETA)
        Prompt the user during backup for the unique ID to use from the hard coded lists.

Usage: DS_RESTORE_DATA [ -e "guest admin shared" ] [ -v "/Volumes/Macintosh HD" ] [ -u /Users ] [ -d "/Volumes/External Drive/" ] [ -t tar ]
Variables can be set in DeployStudio variables window when running script.
BackupRestore Variables:
-q Unique Identifier.
		Enter the Serial Number of the backup you want to restore.
		For example, if you backup a computer and its Serial Number
		was: W8FGTV01TZZ. You can then specify that Serial as the
		variable to restore the backup to a different computer.
-v Target volume
		Specify full path to mount point of volume
		Default is the \$DS_LAST_RESTORED_VOLUME volume
		e.g. "/Volumes/Macintosh HD"
-u User path on target
		Set to path of users on volume
		Default is /Users
-r Backup Repository Path
		Set to path of the backup volume
		Default is the DS Repository
		e.g. "/Volumes/NFSDrive/Backups"
-p Prompt for Unique ID (BETA)
		Prompt the user during restore for the unique ID to use from the hard coded lists.



## Advanced Usage ##

Unique Identifier Usage:

If you'd like to backup from one computer and restore to another, you can specify the Serial Number as the UNIQUE_ID (-q) when restoring. This tells the restore scripts to pull the backup from the old computer (by Serial Number) rather than look for a backup from the same computer (same Serial Number).

Alternatively, you can specify a UNIQUE_ID (-q) for both backup and restore. This way, the scripts will ignore the Serial Number of the machines and backup and restore the data using a folder named with the the specified variable. Be sure to set the target volume (-v) for the Backup and Restore so the scripts know where to pull the backup from and where to restore it to. Otherwise, the BackupRestore scripts will use the internal drive of that machine as the backup and restore destinations. 

If you'd like to have the user prompted for which Unique ID to use, configure both Backup and Restore with the values you want and use the -p flag to force it to prompt during runtime. Selecting the same Unique ID for Backup and Restore will allow you to backup from one device and restore to any other. (BETA) The variable PROMPT_UNIQUE="1" can also be hard coded in the scripts to force a prompt

About

BackupRestore scripts for user accounts when using DeployStudio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages