Has anyone written a backup script?

For discussion of topics specific to MythTV on linux
Post Reply
StefanJ
Junior
Posts: 27
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

Has anyone written a backup script?

Post by StefanJ »

I'm in the process of putting together a "successor" Myth Box. A lot faster than my existing unit (i7 with 12 Gig!) and hopefully up for streaming 4K once GPUs become affordable.

I bought a cute little external drive which is big enough to back up both video volumes and the user directory.

I started writing a script which would use either rsync or cp to do a periodic backup of the video volumes, as well as the mythconverg database.

I'm sure I can figure it out once I dust off my shell scripting skills, but I thought I'd check to see if I'm not reinventing the wheel.

Ideally, the script would do an incremental copy, and maybe even sync the working and backup video volumes, deleting shows I have watched and deleted.

(This will by my fourth Myth box in ten years!)

Thanks

Stefan
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: Has anyone written a backup script?

Post by PhilB »

I wrote a script to do daily database backups under 0.27 but it should work with 31. See autobackup.sh in the wiki.
Another script copies and updates a 'best' subset of recordings to a spare partition. See autobackup.pl.
These may give you some pointers or ideas.
Phil
User avatar
Steve Goodey
Moderator
Posts: 219
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Has anyone written a backup script?

Post by Steve Goodey »

Don't forget the Wiki.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Has anyone written a backup script?

Post by pgbennett »

Runs once a week after database backup. Backs up selected recording groups (excludes deleted, news, unimportant stuff) .

https://github.com/bennettpeter/mythscr ... mexport.sh
Post Reply