[ic] exporting all tables for backup

Grant emailgrant at gmail.com
Sun Mar 13 20:24:03 EST 2005


> > > Is there a better way than this to export all tables so their data can
> > > be backed up with the rest of the catalog:
> > >
> > > [loop list="products userdb etc"]
> > >         [export table="[loop-code]"]
> > > [/loop]
> > >
> > > - Grant
> >
> > Grant,
> >
> > Are we talking a manual or automated backup? If you're doing manual
> > backups of your interchange data tables then MySQL Administrator works
> > wonderful for this; puts everything including the SQL needed for restore
> > along with all the data into on handy file that takes seconds to restore.
> >
> > If you're talking about an automated process you may want to take a look
> > at assigning this duty to a perl program that will accomplish basically
> > the same thing; a PERL program connected to a cron job.
> >
> >
> 
> You may not need to write a perl script if you are using MySQL.  Just use the
> mysqldump program found in most MySQL distributions.  You could add something
> like this to your crontab:
> 
> 0 3 * * * mysqldump --user=user --password=password interchange_database >
> /path/to/backup.sql
> 
> Or a simple bash wrapper script that rotates the destination file.
> 
> (Check mysqldump --help or http://dev.mysql.com/doc/mysql/en/mysqldump.html for
> more options)
> 
> - Brian

Thanks guys, that sounds pretty slick but IC already has a
dumper/exporter built in right?  Using that makes it easy to backup
the database data along with the catalog files.  I suppose something
like mysqldump would be just about as simple.

- Grant


More information about the interchange-users mailing list