Page 1 of 1

Has anyone written a backup script?

Posted: Mon Mar 22, 2021 2:47 am
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

Re: Has anyone written a backup script?

Posted: Mon Mar 29, 2021 9:40 pm
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

Re: Has anyone written a backup script?

Posted: Tue Mar 30, 2021 8:58 am
by Steve Goodey

Re: Has anyone written a backup script?

Posted: Tue Mar 30, 2021 1:59 pm
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