|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Tips on using Rsync to mirror video folders?
Hey guys,
Hoping some of you rsync experts can chime in on this one... I've got 2 boxes, one with a shared folder with a directory of video files with which I'd like to copy entire folder structures of content over to a video share on another box. This would ordinarily look something like this... "rsync -avzru /mnt/samba/videos 192.168.1.2:/mnt/samba/videos" But, because the video folder on the first box contains some file types I don't want to copy over, I want to do something a bit different. What I'd like to be able to do is add a search argument that only copies those files and those folders structures that are or contain an "mkv" file in them... So, if I have an xzy.mkv file thats new and not in the folder on machine 2, I want to copy that over. If have a folder titled abc, that contains a file named, abc.mkv, thats not on machine 2, I want to copy that whole folder structure over. Any thoughts? I've used rsync a bit, but I'm not an expert. Hoping someone has some quick wisdom to share. I'd rather not experiment with these two folders... Thanks!! jbmia |
#2
|
|||
|
|||
unison
I would look at unison.
http://www.cis.upenn.edu/~bcpierce/unison/ I have been using this for years and controlling it with several include, ignore, path statements in the .prf You can have it sync the two side or use force option to have one side always win (mirror). I use the batch option, ssh keys (no password prompt) or remote side with socket running and crontab to automate it.. |
#3
|
||||
|
||||
rysnc has --include and --exclude filters... so you could use --include "*.mkv" to only sync mkv files or --exclude '*.properties' if you didn't want the .properties synced.
http://samba.anu.edu.au/ftp/rsync/rsync.html
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
Quote:
I use a set of shell scripts that do various invocations of rsync with --exclude, so I do things like backup videos, but not things that are in my temporary directories (m2ts files, or mkvs before subtitles are merged int" Usually, my rsync looks something like this: Code:
rsync -axvPS --exclude='sagetv/temp/' --exclude='sagetv/videos/*.m2ts' --delete --delete-excluded /mnt/storage /mnt/backups/2011.02.13/
__________________
Current Server: Sage v7.1.9.1 beta w/ Diamond UI on Ubuntu 11.10 x86_64 | Storage: Linux md's raid10,f2 | Client: HD300 extender | Tuner: HDHomeRun for QAM |
#5
|
|||
|
|||
Thanks for the tips guys... Apologies for the late reply, I was out last week.
I'll check out Unison... but in the mean time, regarding rsync, I'm a bit confused on one point... I'm good on the exclude examples and the trailing slashes.. those are pretty straight forward points.. I want to copy individual mkv files AND any folder structures that also include them... while at the same time excluding other file types... I get the exclude option, but how to copy my mkv files over while ALSO preserving any folder structures they exist in and copy them over within that path structure?? Thanks for any additional insight! jbmia |
#6
|
|||
|
|||
Code:
rsync -axvP --include='*/' --include='*.mkv' --exclude='*' /mnt/storage/sagetv/ /mnt/backups/
__________________
Current Server: Sage v7.1.9.1 beta w/ Diamond UI on Ubuntu 11.10 x86_64 | Storage: Linux md's raid10,f2 | Client: HD300 extender | Tuner: HDHomeRun for QAM |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to clear old SageMC video folders | sportera | SageMC Custom Interface | 2 | 10-10-2010 04:05 PM |
Separate Video Folders? | sflamm | SageMC Custom Interface | 7 | 04-07-2009 07:04 PM |
Watched Video Count for Video Folders | jusjoken | SageTV Customizations | 0 | 08-02-2008 09:12 AM |
Folders with Subfolders with Video | igraul | SageTV Software | 2 | 02-13-2006 11:56 AM |
Changing order of video folders | Stuntman | SageTV Customizations | 1 | 08-26-2005 12:08 PM |