Backup

From Wiki
Revision as of 11:09, 12 June 2009 by Admin2 (talk | contribs) (New page: go back to Main Page, Computational Resources, Information & Help '''Please, talk with your supervisor and Martín about performing buckups, ..''' ===How to make backup ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

go back to Main Page, Computational Resources, Information & Help


Please, talk with your supervisor and Martín about performing buckups, ..


How to make backup from a remote machine

Here a short outline on how to make automatic backup from a remote machine is given. Most of this can be found elsewhere on the Internet, but main ideas are given here for convenience.

  1. set up ssh to connect via public key authentication
  2. download and install keychain
  3. download and install rsync (if it's not already there)
  4. write a script like this:
#! /bin/bash
source ~/.keychain/$HOSTNAME-sh
rsync -avz --exclude-from=exclude-list  $USER@kimik: /some/backup/folder

5. put the script in a cron job

Some comments

the exclude-list is a file that defines an exclusion pattern. For instance, if you do not want to backup core files and .chk files, you can define that pattern as this:

core*
*.chk

If you for instance want to backup your files everyday at 6 am., you edit the crontab like this:

00 06 * * * absolute path of your script