Welcome to Geeklog, Anonymous Monday, January 06 2025 @ 03:34 pm EST
Geeklog Forums
Auto backup via Unix Cron
Auspexian
Anonymous
Hi all,
anyone has a script for automatically backup both the geeklog directory and the database to a local file? then maybe ftp it to another site?
I found a ftp backup script that can be modify. to backup the geeklog and public_html directories.
What is the full command line to backup via mysqldump the database to a file?
I can insert it into the script and have it ftp all to a remote site nightly via crontab.
thank you
John
anyone has a script for automatically backup both the geeklog directory and the database to a local file? then maybe ftp it to another site?
I found a ftp backup script that can be modify. to backup the geeklog and public_html directories.
What is the full command line to backup via mysqldump the database to a file?
I can insert it into the script and have it ftp all to a remote site nightly via crontab.
thank you
John
8
8
Quote
Status: offline
ByteEnable
Forum User
Full Member
Registered: 10/20/03
Posts: 138
Here is a script I use from a cron job. It backs up my whole site, including database, nightly.
#! /bin/sh
# This script backs up LinuxElectrons code, plus MySQL database
rm -f geeklog/backups/*.sql
cur_date=`date +%a-%d%m%y`
mysqldump -hhostname -uuser -ppassword --opt dbname > geeklog/backups/geeklog.$cur_date.sql
tar zcvf le-backup.$cur_date.tar.gz www
Text Formatted Code
#! /bin/sh
# This script backs up LinuxElectrons code, plus MySQL database
rm -f geeklog/backups/*.sql
cur_date=`date +%a-%d%m%y`
mysqldump -hhostname -uuser -ppassword --opt dbname > geeklog/backups/geeklog.$cur_date.sql
tar zcvf le-backup.$cur_date.tar.gz www
9
7
Quote
auspexian
Anonymous
Cool. Thanks so much.
7
6
Quote
All times are EST. The time is now 03:34 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content