[mythtv-users] rsync deleted source and destination while moving recordings to a new drive

jarpublic at gmail.com jarpublic at gmail.com
Fri Feb 20 17:21:16 UTC 2009


No files are deleted from the source in any ways when you use --del.

>
> Yeah that's right. Just deletes files from the target.
>
> But the OP said he did the transfer in two stages. If he had deleted
> things from the source between the two transfers then rsync would
> make the same deletions in the second transfer.
>
>
OK now I think I know what happened. I did try another step which in
hindsight was the correct step, but my mistake was I didn't see anything in
the output saying that it had deleted any files so I thought it was the
wrong choice and that it had done nothing. Actually after the initial rsync
I tried using --remove-source-files. Since I was using verbose output I
thought it would show me which files it had deleted, however there was no
indication that any files were deleted (there may have been a single brief
line indicating the total but I must have overlooked it because I was
expecting to see more). I figured the remove-source-files must only work
when the files were actually being copied, and since I had synced them all
in a previous step and none of them were actually copied this time, and so I
thought the remove-source-files must have done nothing. However, in reality
that step must have worked correctly and removed all the source files, but I
failed to recognize it and didn't double check in the actual source. So I
went back into the man page and tried the --del (ie --delete-during) option.
Which as some of you have explained now will remove anything from the dest
that isn't in the source (which I had unknowingly emptied in the previous
step). So like most disasters it was a combination of smaller mistakes that
culminated in the ultimate result. It is of some consolation that apparently
I am not the only one that can get confused by the bewildering amount of
rsync options ;-).

Thanks to some of you for extending the hope that I was looking in the wrong
directory, but after doing an 'ls' command, I used 'du' to confirm that the
drives are empty.

In the spirit of "perhaps my purpose in life is serving as a warning to
other", the source directory was on a RAID array, which provides zero help
in a case like this. Fortunately I wasn't messing with my videos folder at
the same time. I still have everything in Myth Video and Myth Music intact.

Like it has been said many times on the list, it's only TV :-). Now for the
second issue how can I clean things up so that these things will be allowed
to rerecord. I searched the archives more thoroughly and some have suggested
using myth.find_orphans. However it was unclear whether this will/can remove
the orphans from the previously recorded tables. I found another post that
suggested that as of .21 I can just go into watch recordings and select all
of the recordings (I assume with a playlist for ease) and the choose delete
but allow rerecord. Will this work? or is the find_orphans script the way to
go.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090220/1d142de9/attachment-0001.htm>


More information about the mythtv-users mailing list