GithubHelp home page GithubHelp logo

tonyliu2ca / backuprestore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rustymyers/backuprestore

0.0 1.0 0.0 60 KB

BackupRestore scripts for user accounts when using DeployStudio

Home Page: http://rustyisageek.blogspot.com/p/backuprestore-scripts.html

Shell 100.00%

backuprestore's Introduction

BackupRestore Scripts
Current Version - 0.7.5

## 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

backuprestore's People

Contributors

hoeflercomain avatar jszaszvari avatar robperc avatar rustymyers avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.