[vox-tech] Tar, MySQL, and cron-ed backups
David Siedband
vox-tech@lists.lugod.org
Fri, 5 Dec 2003 12:24:59 -0800
Why not just export the the databases with MySQL-dump and back up the
exported files instead of the live databases?
--
Dave
On Dec 5, 2003, at 11:43 AM, Marc Elliot Hall wrote:
> Date: Fri, 05 Dec 2003 11:43:54 -0800
> From: Marc Elliot Hall <marc@hallmarc.net>
> To: Vox-Tech <vox-tech@lists.lugod.org>
> Subject: [vox-tech] Tar, MySQL, and cron-ed backups
> Reply-To: vox-tech@lists.lugod.org
>
> Each night I run via cron a shell script to backup one of my Debian
> boxes, which has NFS-mounted partitions for the rest of my network.
>
> The backup is supposed to do a full copy-to-tape of all the specified
> directories, including the NFS-mounted partitions.
>
> However, I get a "tar: file changed as we read it" error on a couple of
> MySQL db files because they are in use during the backup. Locking the
> files during the backup is not an option because another automated
> process -- which really can't be rescheduled, either -- writes to them
> during the same window.
>
> I could --exclude the files; but that would mean they don't get backed
> up properly (meaning automatically), which would be a Bad Thing.
>
> So, if tar is saying the "file changed as we read it", does that mean
> that tar:
> * skipped the file,
> * made a copy of the version that existed when tar *started* the
> operation,
> * made a copy of the version that existed when tar *finished* the
> operation, or
> * some combination of these?
>
> Why, look, someone with *precisely* the same question -- and no answer
> since April 2001:
> http://mail.gnu.org/archive/html/help-gnu-utils/2001-04/msg00021.html
>
> Somebody with a suggested workaround using mysqldump that doesn't quite
> work for me:
> http://ben.milleare.com/archives/000016.html
>
> Any other ideas?
>
>
>
> --__--__--
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>
> End of vox-tech Digest
>