MyServerPerforceBackupProcedure #4

  • //
  • guest/
  • philip_kania/
  • AdminScripts/
  • MyServerPerforceBackupProcedure
  • View
  • Commits
  • Open Download .zip Download (3 KB)
#!/bin/bash
# Copyright (c) 2009 Exemplics LLC

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Version 2009.3

# Setup the environment

# Day of week, one of: Sun Mon Tue Wed Thu Fri Sat
export dayOfWeek=$(date +%a)

# <Configurable>

# For testing. Don't actually run commands.
export runCommands=
# For production
# export runCommands=true

# backup types for use with this script are normal and incremental
# normal is a full backup
if [[ ${dayOfWeek} == Sun ]]; then
   export backupType=normal
else
   export backupType=incremental
fi

# p4, p4d, tar and PerforceBackupProcedureLibrary must be in PATH
export PATH=${PATH}

# Directory names below should not have trailing / characters.
# These will be added as needed.

# Directory where backups are stored.
export backupDirectory=

# Directory where results are stored.
# It is useful to have this be a share so
# downstream operations can access them.
export logDirectory=

# Name for log and location of Perforce database
export serverShortName=MyServer

# Allow connection info via P4CONFIG.
# Change this to the path to the workspace where p4 client commands should run.
export workspace=${HOME}

# Include xsl stylesheet in xml output.
# export  includeStyleSheet=
export includeStyleSheet=true

# Values for RSS feed generation

# Name of rss feed file that will be generated.
export rssFeedFile=PerforceBackupProcedureResults.rss

# URI to location of backup logs and RSS feed on your intranet
export rssLink=http://example.com/BackupLogs

# email addresses used in RSS feed
export [email protected]
export [email protected]

# </Configurable>

PerforceBackupProcedureLibrary
PerforceBackupProcedureRSS
# Change User Description Committed
#4 7202 Philip Kania Added scripts to generate RSS feeds.
Updated template configuration scripts to run RSS scripts.
#3 7192 Philip Kania Version 2009.2.
Added XSLT and CSS style sheets for diplayign XML results as HTML. Added a switch to the scripts to include in the XML results file a link to the XSLT style sheet.
#2 7183 Philip Kania Removed extraneous " in template configuration script
#1 7182 Philip Kania Added version 2009.1 of backup procedure scripts for Microsoft Windows and Unix