/[smeserver]/rpms/e-smith-mysql/sme7/e-smith-mysql-1.12.0-split_backup_db.patch
ViewVC logotype

Annotation of /rpms/e-smith-mysql/sme7/e-smith-mysql-1.12.0-split_backup_db.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Oct 7 18:44:56 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' e-smith-mysql-1.12.0/createlinks mezzanine_patched_e-smith-mysql-1.12.0/createlinks
2     --- e-smith-mysql-1.12.0/createlinks 2006-03-15 23:44:28.000000000 -0700
3     +++ mezzanine_patched_e-smith-mysql-1.12.0/createlinks 2006-12-27 20:23:55.000000000 -0700
4     @@ -39,6 +39,9 @@
5     templates2events("$_", $event);
6     }
7    
8     +# Move all database dumps except for mysql.dump to sql/init
9     +event_link("mysql-load-tables", $event, "40");
10     +
11     #--------------------------------------------------
12     # actions for timezone-update event
13     #--------------------------------------------------
14     diff -Nur -x '*.orig' -x '*.rej' e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-delete-dumped-tables mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-delete-dumped-tables
15     --- e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-delete-dumped-tables 2006-03-15 23:44:28.000000000 -0700
16     +++ mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-delete-dumped-tables 2006-12-27 20:23:30.000000000 -0700
17     @@ -1,3 +1,3 @@
18     #!/bin/sh
19    
20     -exec /bin/rm -f /home/e-smith/db/mysql/mysql.dump
21     +exec /bin/rm -f /home/e-smith/db/mysql/*.dump
22     diff -Nur -x '*.orig' -x '*.rej' e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-dump-tables mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-dump-tables
23     --- e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-dump-tables 2006-12-27 20:25:59.000000000 -0700
24     +++ mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-dump-tables 2006-12-27 20:23:30.000000000 -0700
25     @@ -6,5 +6,7 @@
26     echo "mysqld is disabled - no tables dumped" >&2
27     exit 0
28     fi
29     -exec >/home/e-smith/db/mysql/mysql.dump
30     -exec /usr/bin/mysqldump --add-drop-table -A -Q
31     +for db in $(mysql -BNre "show databases;")
32     +do
33     + mysqldump --add-drop-table -QB "$db" -r /home/e-smith/db/mysql/"$db".dump || exit 1
34     +done
35     diff -Nur -x '*.orig' -x '*.rej' e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-load-tables mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-load-tables
36     --- e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-load-tables 1969-12-31 17:00:00.000000000 -0700
37     +++ mezzanine_patched_e-smith-mysql-1.12.0/root/etc/e-smith/events/actions/mysql-load-tables 2006-12-27 20:25:18.000000000 -0700
38     @@ -0,0 +1,15 @@
39     +#!/bin/sh
40     +
41     +status=$(/sbin/e-smith/config getprop mysqld status)
42     +if [ "$status" = "disabled" ]
43     +then
44     + echo "mysqld is disabled - no tables restored" >&2
45     + exit 0
46     +fi
47     +if [ ! -f /var/lib/mysql/mysql/user.frm ]
48     +then
49     + for db in $(ls /home/e-smith/db/mysql/*.dump 2> /dev/null | grep -v '/mysql.dump')
50     + do
51     + mv $db /etc/e-smith/sql/init/01_$(basename $db .dump).sql
52     + done
53     +fi

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed