csdl / wattdepot

0 stars 1 forks source link

Local backup #65

Closed jtakayama closed 11 years ago

jtakayama commented 11 years ago

Requesting review of the following:

This adds a new directory, localBackup, to the top level of the WattDepot project. localBackup contains three files intended for use on Linux systems to retain a monthly backup and all backups from the last 7 days (604800 seconds).

This also adds a .gitattributes file to the top-level directory to force all commits of text files to have Unix line endings. It is identical to the current Makahiki .gitattributes.

cammoore commented 11 years ago

Merged into csdl/wattdepot.

On Sat, Sep 7, 2013 at 12:58 AM, Jordan Takayama notifications@github.comwrote:

This adds a new directory, localBackup, to the top level of the WattDepot project. localBackup contains three files intended for use on Linux systems to retain a monthly backup and all backups from the last 7 days (604800 seconds).

  • _wattdepot_backupscript.sh: Backs up the Wattdepot database and other files into a .tar.gz archive, which it places in /wattdepot-backups on the system.

    • This script enables wattdepot_backup_script.sh to be run automatically.
    • On the first day of the month, it copies the backup it makes to a /wattdepot-backups/monthly directory.
    • Daily backups are deleted after 7 days with the user's permission.
    • If the script is run with --delete-auto, it deletes daily backups more than 7 days old without asking.

    _wattdepot_backkuprunner.sh: Runs wattdepot_backup_script.sh with its --delete-auto option and a value set for the PGPASSWORD environment

    variable.

    _localBackup/wattdepot_postgresql_backupprocedure.txt: Instructions for the use of the files.

This also adds a .gitattributes file to the top-level directory to force all commits of text files to have Unix line endings. It is identical

to the current Makahiki .gitattributes.

You can merge this Pull Request by running

git pull https://github.com/jtakayama/wattdepot local-backup

Or view, comment on, or merge it at:

https://github.com/csdl/wattdepot/pull/65 Commit Summary

  • Committing first working version of backup script and instructions.
  • Adding a .gitattributes file.
  • Created wrapper script wattdepot_backup_runner.sh for wattdepot_backup_script.sh.
  • Created wrapper script wattdepot_backup_runner.sh for wattdepot_backup_script.sh.
  • Added instructions for automatic backup, added notes on the deletion of old backups, and made references to WattDepot servers more general.
  • wattdepot_backup_runner.sh: Changed relative path to absolute path.
  • wattdepot_postgresql_backup_procedure.txt: Reorganized instructions and system requirements.

File Changes

  • A .gitattributeshttps://github.com/csdl/wattdepot/pull/65/files#diff-0(5)
  • A localBackup/wattdepot_backup_runner.shhttps://github.com/csdl/wattdepot/pull/65/files#diff-1(8)
  • A localBackup/wattdepot_backup_script.shhttps://github.com/csdl/wattdepot/pull/65/files#diff-2(101)
  • A localBackup/wattdepot_postgresql_backup_procedure.txthttps://github.com/csdl/wattdepot/pull/65/files#diff-3(225)

Patch Links: