source: trunk/MagicSoft/Mars/datacenter/scripts/budb@ 8688

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