[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wiki?
From: |
Laurent Jacques |
Subject: |
Re: Wiki? |
Date: |
Wed, 22 Sep 2004 13:40:27 +0200 |
User-agent: |
KMail/1.6.2 |
On Wednesday 22 September 2004 12:36, Stefan van der Walt wrote:
| Is the Wiki currently being backed up? How about a crontab entry to
| pack it every day and ship it off somewhere safe?
Here is a simple trick to realize this (of course, more perfect scripts
exist):
----
# file /etc/cron.daily/backup_mysql_tables
#!/bin/bash
bakdir=/the/backup/dir/
bakfile=all_databases.sql
# Rotate previous backups
[ -f $bakdir/$bakfile.4 ] && rm -f $bakdir/$bakfile.4
[ -f $bakdir/$bakfile.3 ] && mv $bakdir/$bakfile.3 $bakdir/$bakfile.4
[ -f $bakdir/$bakfile.2 ] && mv $bakdir/$bakfile.2 $bakdir/$bakfile.3
[ -f $bakdir/$bakfile ] && mv $bakdir/$bakfile $bakdir/$bakfile.2
# Create new backup
mysqldump --all-databases --password=xxxx > $bakdir/$bakfile
----
Regards,
Laurent.
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Wiki?, David Bateman, 2004/09/21
- Re: Wiki?, Etienne Grossmann, 2004/09/21
- Re: Wiki?, Stefan van der Walt, 2004/09/22
- Re: Wiki?,
Laurent Jacques <=
- Re: Wiki?, Etienne Grossmann, 2004/09/22
- Re: Wiki?, Laurent Jacques, 2004/09/22
- Re: Wiki?, Stefan van der Walt, 2004/09/23