- Offizieller Beitrag
Hallo,
hier ein Backupscript gefunden was sicherlich einige Nutzen können.
Das ganze in ein Shell Script packen chmod 755 und ausführen danach Backupfile einfach per WinSCP weg kopieren. ![]()
Code
#! /bin/sh
# --settings: includes all settings files
# uses '/home/httpd/html/backup/include.system' listing, but excludes
# database dumps listed in '/home/httpd/html/backup/include.dumps'
# --logs: includes all log files within backups.
# uses '/home/httpd/html/backup/include.logs' listing, but excludes log
# archives listed in '/home/httpd/html/backup/include.logarchives'
# --logarchives: includes also (does not exclude) log archives, listed
# in '/home/httpd/html/backup/include.logarchives'
# --dbdumps: includes (does not exclude) database dumps listed in
# '/home/httpd/html/backup/include.dumps'
# --cron: signalizes that the backup has been created by a cronsscript
# --factory: creates factory defaults backup which includes only settings
# --message: puts a message within meta data file
# --gpgkey: encrypt the backup with the supplied gpg key
#message to store in meta file
MSG="Weekly Backup"
#number of backups to keep
DATE="`date --date='2 week ago' +%Y%m%d`"
#path to backups
BACKUPDIR="/home/httpd/html/backup/"
#create backups
/usr/local/bin/backup-create --settings --logs --logarchives --dbdumps --cron --message="$MSG"
#delete backups
rm -rf $BACKUPDIR\backup-$DATE*
Alles anzeigen