Last change
on this file since 8078 was 8078, checked in by Daniela Dorner, 18 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
551 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | datum=`date +%F`
|
---|
4 | dbyd=`date +%F --date="-48hour"`
|
---|
5 |
|
---|
6 |
|
---|
7 | set -C
|
---|
8 |
|
---|
9 |
|
---|
10 | path=/home/operator/budb
|
---|
11 | logfile=$path/log/budb$datum.log
|
---|
12 |
|
---|
13 | date > $logfile
|
---|
14 |
|
---|
15 | #echo $logfile
|
---|
16 |
|
---|
17 | echo "today: $datum" >> $logfile 2>&1
|
---|
18 | echo "dbyesterday: $dbyd" >> $logfile 2>&1
|
---|
19 |
|
---|
20 | file=$path/alldatabases
|
---|
21 | end=.sql.bz2
|
---|
22 |
|
---|
23 | dbydfile=$file$dbyd$end
|
---|
24 | echo "removing old file..." >> $logfile 2>&1
|
---|
25 |
|
---|
26 | rm -v $dbydfile >> $logfile 2>&1
|
---|
27 |
|
---|
28 | echo "writing all databases to file..." >> $logfile 2>&1
|
---|
29 | set +C
|
---|
30 | mysqldump --host=hercules --all-databases -u dump | bzip2 -9 -c > $file$datum$end 2>> $logfile
|
---|
31 |
|
---|
32 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.