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

Nick Rout nick.rout at gmail.com
Sat Dec 5 20:09:41 UTC 2009


On Sun, Dec 6, 2009 at 7:00 AM, Harry Devine <lifter89 at comcast.net> wrote:
> Nick Rout wrote:
>>
>> On Thu, Dec 3, 2009 at 4:35 PM, Harry Devine <lifter89 at comcast.net> 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.
>>
>> My suggestion assumes that there are no extraneous files in
>> /home/of/backups/
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>
>
> I now have my myth box running the cron job successfully, but the rsync
> doesn't seem to be working right.  Its copying the new files to my other
> machine, but its not deleting the old ones.  So, on my myth box, I have the
> last 7 days, but my other machine currently has the last 11.  Here's what my
> backup script in /etc/cron.daily looks like:
>
> #!/bin/sh
>
> su - hdevine -c "/usr/bin/mythconverg_backup.pl --rotate 7"
> su - hdevine -c "rsync --delete -az /home/hdevine/db_backups/*
> 192.168.1.103:/archive/mythdb_backups/"
>
> Does anyone have any idea why the rsync wouldn't delete the old files?  What
> I'd like to have is the same 7 files that are backed up on my Myth box exist
> on my desktop.

not sure. try rsync with -v (verbose) fromcommand line and see what it says

>
> Thanks,
> Harry
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list