View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun May 01, 2005 12:53 pm 
Offline
Joined: Mon Nov 17, 2003 8:59 am
Posts: 206
Location: Michigan
This example is to backup the videometadata table in mythconverg, but could be adapted to backup anything.

I use an external usb disk to hold my video's. If it's unmounted when the video manager is started all the video info is lost. I decided to write a script to back it up daily, and keep multiple copies around so I could always find a good one. Then I came across a tip to use logrotate to do this. Just add the code below to /etc/logrotate.conf and you'll have two weeks worth (due to the rotate 14 and daily lines) of backups of the table. They even get zipped up to save space. :)

Since it saved my butt today, I decided it was worthy of posting.

Code:
# system-specific logs may be configured here
# mythtv videometadata table backup
/var/backups/videometadata.sql {
daily
rotate 14
missingok
compress
postrotate
/usr/bin/mysqldump --opt -umythtv -pmythtv mythconverg videometadata  > /var/backups/videometadata.sql
endscript
}


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu