mirror of
https://github.com/php/systems.git
synced 2026-03-24 15:52:22 +01:00
38 lines
632 B
Bash
Executable File
38 lines
632 B
Bash
Executable File
#!/bin/sh
|
|
# $Id: backup-pear,v 1.4 2007/06/09 18:21:52 mj Exp $
|
|
|
|
# Backup the PECL services
|
|
|
|
basedir=/local/backups
|
|
dir=php-bugsweb-$date
|
|
|
|
cd $basedir
|
|
mkdir $dir || exit 1
|
|
mkdir $dir/php-bugs-patches || exit 1
|
|
mkdir $dir/php-bugs || exit 1
|
|
|
|
#
|
|
# Apache configuration
|
|
#
|
|
cp /etc/apache2/sites-available/bugs.conf $dir/
|
|
|
|
#
|
|
# Database
|
|
#
|
|
nice -n 15 mysqldump --quote-names --quick phpbugsdb > $dir/phpbugs.sql
|
|
|
|
#
|
|
# Patches in the bug tracker
|
|
#
|
|
cp -r /srv/bugs.php.net/uploads $basedir/$dir/php-bugs-patches/
|
|
|
|
#
|
|
# Compress the whole stuff in a gzipped tar archive
|
|
#
|
|
tar cf - $dir | gzip -9 > $basedir/$dir.tar.gz
|
|
|
|
#
|
|
# cleanup
|
|
#
|
|
rm -r $dir
|