/
Yi Shen Mar  18 th ,  2014 Yi Shen Mar  18 th ,  2014

Yi Shen Mar 18 th , 2014 - PowerPoint Presentation

sylvia
sylvia . @sylvia
Follow
342 views
Uploaded On 2022-05-18

Yi Shen Mar 18 th , 2014 - PPT Presentation

1 Backup workshop Stanford Exploration Project Two procedures 2 Two procedures 3 Two procedures 4 rsync amp crontab Two procedures 5 rsync amp crontab Two procedures 6 rsync ID: 911824

cron backup crontab time backup cron time crontab create directory change script mac yishen rsync machine run period success

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Yi Shen Mar 18 th , 2014" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Yi ShenMar 18th, 2014

1

Backup workshop

Stanford Exploration Project

Slide2

Two procedures2

Slide3

Two procedures3

Slide4

Two procedures4

rsync

&

crontab

Slide5

Two procedures5

rsync

&

crontab

Slide6

Two procedures6

rsync

&

crontab

Time machine

Slide7

The first procedure7

rsync

&

crontab

Time machine

Slide8

Introduction of rsync8Synchronize your files and directories from the server to your local computer;Only back up the changes

Slide9

Introduction of crontab9Allows tasks to automatically run in the background of the system at given intervals;Helps you do the backup once a day without manual operation.

Slide10

Procedure10Make a directory in your mac for backupCopy the script to your backup directory

Change the scriptManually run the scriptCreate a

cron scheduleCheck the success of your crontab

Slide11

Procedure11Make a directory in your mac for backup e.g. mkdir

~/backupCreate a file on the server for monitor

e.g mkdir ~/backup/Create a txt file like “I am doing backup”

Slide12

Procedure12Make a directory in your mac for backupCopy

rsync

script to your backup directoryChange the scriptManually run the scriptCreate a cron schedule

Check the success of your crontab

Slide13

Procedure13Download it fromhttp://sepwww.stanford.edu/data/media/public/sep/yishen/backup/

Slide14

Procedure14Make a directory in your mac for backupCopy the

rsync script to your backup directory

Change the scriptManually run the scriptCreate a cron scheduleCheck the success of your

crontab

Slide15

15

Slide16

16

Slide17

17

Slide18

18

Slide19

Procedure19Make a directory in your mac for backupCopy the script to your backup directory

Change the scriptManually run the script

Create a cron scheduleCheck the success of your crontab

Slide20

Manually test20./backupscript.pyThe first backup will take a while Manually running the script for your first backup during the

weekend or in the evening instead of using

crontab is recommended.

Slide21

Procedure21Make a directory in your mac for backupCopy the script to your backup directory

Change the scriptManually run the script

Create a cron scheduleCheck the success of your crontab

Slide22

Create a cron schedule22Type “crontab –e” in the terminal window

The text editor will open a blank window for the “crontab entries” to be entered.

Each line presents a separate cron jobs.

Slide23

Create a cron schedule23* * * * * /Users/yishen/backup/backupscript.py restart

Slide24

Create a cron schedule24* * * * * /Users/yishen/backup/backupscript.py restart

Slide25

Create a cron schedule25* * * * * /Users/yishen/backup/backupscript.py restart

Slide26

Create a cron schedule26An asterisk (*) is used to indicate that every instance of the particular time period will be used. * * * * *

Slide27

Create a cron schedule27An asterisk (*) is used to indicate that every of the particular time period will be used. * * * * *

Minute 0-59

Slide28

Create a cron schedule28An asterisk (*) is used to indicate that every of the particular time period will be used. * * * * *

Hour 0-23 (0 = midnight)

Slide29

Create a cron schedule29An asterisk (*) is used to indicate that every of the particular time period will be used. * * * * *

Day 1-31

Slide30

Create a cron schedule30An asterisk (*) is used to indicate that every of the particular time period will be used. * * * * *

Month 1-12

Slide31

Create a cron schedule31An asterisk (*) is used to indicate that every of the particular time period will be used. * * * * *

Weekday 0-6

Slide32

Change asterisks(*) accordingly 32

Slide33

Change asterisks(*) accordingly 33

Slide34

Change asterisks(*) accordingly 34 For example, Yi Shen’s command would look:

40 1 * * * /Users/yishen/backup/backupscript.py restart

Slide35

Procedure35Make a directory in your mac for backupCopy the script to your backup directory

Change the scriptManually run the script

Create a cron scheduleCheck the success of your crontab

Slide36

Check36Type “ls -ltr /var/mail”Check the time shown in bold as follows

-rw------- 1 yishen

mail 5559 Mar 16 1:40 yishen

Slide37

Check37Type “ls -ltr /var/mail”Check the time shown in bold as follows

-rw------- 1 yishen

mail 5559 Mar 16 1:40 yishen

Slide38

Check (2)38Growl

Slide39

Notice39The first backup will take a while Manually running the script for your first backup during the weekend or in the evening instead of using

crontab is recommended.

Slide40

The second procedure40

rsync

&

crontab

Time machine

Slide41

Procudures41Initialize your hard drive Use time machine to back up your local computer

Slide42

Initialize your hard drive42

Slide43

43

Slide44

Procudures44Initialize your hard drive Use time machine to back up your local computer

Slide45

Introduction of time machine 45The built-in backup that works with your Mac and an external drive;Automatically backs up your entire Mac;Remembers how your system looked on any given day;

Performs subsequent hourly backups of only the files that have changed on your Mac since the last backup

Slide46

Change the backup interval 46From the command linePoint-and-click

Slide47

Change the backup interval 47sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -

int 18000

Slide48

Change the backup interval 48sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -

int 18000

backup interval in seconds — five hours

Slide49

Change the backup interval 49From the command linePoint-and-click

Time machine scheduler

Slide50

Notice50The first backup may take a while;Set up Time Machine in the evening so that the initial backup can be done overnight. 

Slide51

Acknowledgement51Thanks Sjoerd for helping with the rsync script

Thanks Bob for purchasing the cases

Thanks Ohad for providing the internal hard drives

Slide52

Yi ShenMar 18th, 2014

52

Thank you

Stanford Exploration Project