[BACK]Return to backup_config CVS log [TXT][DIR] Up to [local] / openbsd / backup_config

File: [local] / openbsd / backup_config / backup_config (download)

Revision 1.2, Thu May 21 21:54:34 2009 UTC (15 years, 1 month ago) by andrew
Branch: MAIN
Changes since 1.1: +4 -4 lines

backup the mc file used to generate /etc/mail/sendmail.cf since that could come in handy.
also don't backup /home because it is likely big.  It would be handy to have, but . . .

#!/bin/sh
# $RedRiver: backup_config,v 1.1 2007/05/04 20:56:34 andrew Exp $

FILE=`hostname -s`-`date +%Y-%m-%d`

local _mcfile=`grep '^### .*\.mc' /etc/mail/sendmail.cf | cut -d ' ' -f 2`

#  /home \
tar czvf /tmp/${FILE}.tar.gz \
  /root \
  /etc \
  /usr/share/sendmail/cf/$_mcfile \
  /var/backups \
  /var/www/conf