Mauricio Pellegrini said:
> Hi I'm using, Mysql version 4.1.1 with InnoDB under SuSE linux 8.2
>
> I don't know if this is the right place to ask. If not please point me
> in the right direction.
>
> I'm performing nightly backups of the datadir. So my backups include a
> database and the Mysql databases themselves ( also I think there are
> somo innodb files, I think.
>
> For this porpouse I'm using tar and then gzip.
>
> So every backup leaves .tar.gz file containing  the whole datadir.
>
>
>
> My questions are:
>
>
> 1- Are these backups usable in case I need to restore the datadir ?
>
> 2- As they are Full backups, I'm starting to think in doing some kind of
> incremental backups in order to use less space for storage, is that
> possible ?
>
>
> Thank you
> Mauricio
>
Databases in general, hold some information internally and the files
themselves may be in an inconsistent state.  You can of course, stop the
database engine, run the backup and then restore it.  This will ensure
that the files are consistent.  However, I prefer to dump each of the
databases and then backup that.  Since I have many smallish databases this
seems to have minimal impact.  Since all my databases use myisam tables I
can 'cheat' and use the following script:

echo -n 'Dumping at '
date
cd ../mysql
for d in `find -type d -maxdepth 1 -mindepth 1 | sed 's/^\.\///'`
do
mysqldump -u root --password={your mysql root password here}
--add-drop-table -l $d > ../mysqlback/$d.dmp
done

Obviously for a linux setup.



-- 
William R. Mussatto, Senior Systems Engineer
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to