1
0
mirror of https://github.com/php/systems.git synced 2026-03-23 23:32:12 +01:00
Files
archived-systems/backup-main
2024-03-26 15:02:02 +00:00

20 lines
323 B
Bash
Executable File

#!/bin/sh
# $Id$
# Backup the main service
dir=main-$date
mkdir -p /local/backups
cd /local/backups
mkdir $dir || exit 1
mysqldump -u nobody -Q phpmasterdb > $dir/phpmasterdb.sql
cp -r /etc/apache2 $dir
rm -f /local/backups/main-$date.tar.bz2
tar cf - $dir | bzip2 -9 > /local/backups/main-$date.tar.bz2
rm -rf $dir