Backups:Linux: Difference between revisions

From Computer Science Wiki
Jump to navigation Jump to search
(Created page with "==How to Set Up Backups== ===Create the Backup Set=== * Follow the steps to Create a Backup Set === Windows === ---- ====Set up the rsync client==== * Dow...")
 
No edit summary
 
Line 4: Line 4:
* Follow the steps to [[Backups:Create|Create a Backup Set]]
* Follow the steps to [[Backups:Create|Create a Backup Set]]


=== Windows ===
=== Linux ===
----
----
====Set up the rsync client====
====Set up the rsync client====
Line 28: Line 28:
==== Known Issues====
==== Known Issues====
* Make sure you run the backup script as root.  Running it as another user will probably fail.
* Make sure you run the backup script as root.  Running it as another user will probably fail.
===Windows===
----
===Mac OS X===
----

Latest revision as of 09:47, 1 March 2017

How to Set Up Backups

Create the Backup Set

Linux


Set up the rsync client

Configure the rsync client

  • Open the dobackup.sh file in a text editor.
  • Set the following fields based on the backup set created in step 1: UserID, RsyncServer, BackupName
  • Edit secret file and set your backup password there.
  • Check your includes.txt and excludes.txt to make sure they include and exclude what you want to backup.

Setting the backup to run automatically

  • Create a cron entry for the root user using the command "crontab -e"
  • Create the following entry: X Y * * * /root/csbackups/doBackup.sh > /dev/null 2>&1
  • Change X to be any number between [0 - 59] This will be the minute that the backup runs
  • Change Y to be any number between [0 - 23] This will be the hour that the backup runs
  • Having a random X and Y insures that backups do not run at the same time for every machine.

Setting the backup to run on demand

  • To run the backup on demand simply run /root/csbackups/doBackup.sh as root

Known Issues

  • Make sure you run the backup script as root. Running it as another user will probably fail.