Backing rt up

what’s the ‘official’ script for dumping the tables before backup?

thx

what’s the ‘official’ script for dumping the tables before backup?

There’s no “official” script as such - it depends on what database you’re
using as the backend. I use mysql and have ever-so-slightly hacked the
contributed rt-backup script (see ftp.fsck.com/pub/rt/rt1-contrib IIRC). It’s
basically just
mysqldump -c -t rt2 > rt.sqldump
mysqldump -d rt2 > rt.sqlschema
You can then restore the whole lot (assuming a fresh install of rt2
thereafter) with
mysql rt < rt.sqlschema
mysql rt < rt.sqldump
(with whatever usernames and passwords you have specified).

cheers
john

you want to use mysqldump. Depending on the version/platform you have,
mysqldump -a > file.sql will dump all the tables. Otherwise you can use
mysqlshow to get table names and use mysqldump to dump them
into files.

To put the tables back in, I’d suggest: mysql < file.sql.

Although, Alesh Mustar alesh@sportina.si very recently posted the
following:

mysqldump -c -t -uroot -ppassword rt2 > rt2.sqldump
mysqldump -d -uroot -ppassword rt2 > rt2.sqlschema

which might work better.

Sheeri Kritzer
Systems Administrator
University Systems Group
Tufts University
617-627-3925
sheeri.kritzer@tufts.eduOn Wed, 21 Nov 2001 darrellb@hhcl.com wrote:

what’s the ‘official’ script for dumping the tables before backup?

thx


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users