[mythtv-users] Using the mythconverg_backup.pl script (slightly OT)

Michael T. Dean mtdean at thirdcontact.com
Thu Dec 3 16:46:56 UTC 2009

On 12/03/2009 10:59 AM, Bill Bogstad wrote:
> On Wed, Dec 2, 2009 at 10:41 PM, Nick Rout wrote:
>> On Thu, Dec 3, 2009 at 4:35 PM, Harry Devine wrote:
>>> I've been using the mythconverg_backup.pl script in a cron job for a few
>>> weeks now.  I have it on a 7 day rotation.  I have another PC in the house
>>> that is running plain-jane Ubuntu 9.10 and I want to archive my database
>>> backups to that PC.  I have the authorized_keys mechanism working properly
>>> between the 2 PCs, but I'm a little unsure of how to get only the latest
>>> file over there.
>>> What I'd really like to have is the same 7 files on both machines.  But how
>>> do I do this?  Do I issue some sort of remote shell command to delete the
>>> files on the backup PC then copy over the Myth backup files?  Perhaps create
>>> a cron job on the backup PC to cleanup the directory at a time BEFORE the
>>> new backups come over?
>>> I'm sure I'm over thinking this a little, but I'm open to suggestions.
>> rsync --delete -az /home/of/backups/* othermachine:/place/for/them/there/
>> --delete will delete from the destination directory anything that is
>> not in the source directory so you don't get a big build up in there.
> I'm not 100% sure of this, but I don't think that rsync is going to
> work any more efficiently then a rcp/scp would for this
> purpose.  I'm pretty sure that rsync compares files by names (not
> inodes).

It compares them by "metadata" (file size and last modification time).  
With --checksum, it will use a 128-bit MD4 checksum of each.

>   The problem is that the file that was foo.3 today
> is going to be the file foo.4 tomorrow and from what I have seen (and
> a brief google search) rsync pays no attention to
> file renames.

However, in the case of the backups from the backup script, the files 
aren't renamed for rotation, so rsync (or whatever) will work fine for 
copying to a remote system.  The backup files are always of the format 
<dbname>-<db schema ver>-<date time>.sql (and possibly compressed), so 
you'll see names like:



More information about the mythtv-users mailing list