February 2, 201610 yr I am wanting to move a bunch of stuff using rsync like this: rsync -av /mnt/user/media/tvshows/ /mnt/user/media-temp/tvshows/ I am using manual split levels and I would like unRAID to apply the allocation method I have set up. Unfortunately, rsync looks through /mnt/user/media/tvshows/ and creates destination directories of all my tvshows first, before performing any moves. This means that all the tvshow directories get created on the same first disk available according to the allocation method. What I would like to happen is for the first tv show directory to get created within tvshows, for its contents to be rsync'ed, and then on to the next directory. At some point, unRAID will decide that according to the allocation method, the next disk should be used. Does anyone know how I can make this work using rsync?
February 2, 201610 yr I am wanting to move a bunch of stuff using rsync like this: rsync -av /mnt/user/media/tvshows/ /mnt/user/media-temp/tvshows/ I am using manual split levels and I would like unRAID to apply the allocation method I have set up. Unfortunately, rsync looks through /mnt/user/media/tvshows/ and creates destination directories of all my tvshows first, before performing any moves. This means that all the tvshow directories get created on the same first disk available according to the allocation method. What I would like to happen is for the first tv show directory to get created within tvshows, for its contents to be rsync'ed, and then on to the next directory. At some point, unRAID will decide that according to the allocation method, the next disk should be used. Does anyone know how I can make this work using rsync? What's your end game here? media-temp makes me think this is just a short term move? Also I wish I could help, but I was under the impression that rsync worked that way already... are you sure it doesn't actually work the way the way you want? The reason I say this is writes to /mnt/user/ will follow the share rules... rsync doesn't go around that process....
February 2, 201610 yr Author I am wanting to move a bunch of stuff using rsync like this: rsync -av /mnt/user/media/tvshows/ /mnt/user/media-temp/tvshows/ I am using manual split levels and I would like unRAID to apply the allocation method I have set up. Unfortunately, rsync looks through /mnt/user/media/tvshows/ and creates destination directories of all my tvshows first, before performing any moves. This means that all the tvshow directories get created on the same first disk available according to the allocation method. What I would like to happen is for the first tv show directory to get created within tvshows, for its contents to be rsync'ed, and then on to the next directory. At some point, unRAID will decide that according to the allocation method, the next disk should be used. Does anyone know how I can make this work using rsync? What's your end game here? media-temp makes me think this is just a short term move? Also I wish I could help, but I was under the impression that rsync worked that way already... are you sure it doesn't actually work the way the way you want? The reason I say this is writes to /mnt/user/ will follow the share rules... rsync doesn't go around that process.... Right, rsync doesn't go around the process, but the way it works gives me an undesired result. If it simply picked the first folder, moved it, the picked the next folder, moved it, etc. everything would be fine. But what it does is look at ALL the folders it is about to move, creates those folders on the destination (at this point, unRAID's allocation kicks in) and since those empty folders are just a few bytes each, unRAID puts them all onto the same disk. Then rsync begins actually moving files. Well, the problem with this approach it that the disk will fill up before the rsync will complete. I would like to know if there is some way to manipulate rsync to NOT blast a copy of every folder to the destination before it begins moving data.
February 2, 201610 yr Community Expert Maybe take a look at the mover script. It uses rsync and I don't think it does what you are describing so maybe it is using some options that would help.
February 2, 201610 yr Author What's your end game here? media-temp makes me think this is just a short term move? Good question. It is a short term move. I am wanting to move my files around such that unRAID can apply its allocation and split-level methods. In the end, I have decided to make a temporary share (/mnt/user/media-temp), move my stuff from /mnt/user/media one disk at a time by moving from /mnt/diskx/media (where diskx is not part of /mnt/user/media-temp) and then once I empty a disk, add it to media-temp, and continue until all files have been moved. Then at the very end, rename media-temp to media. Do you see a flaw? It seems to be working.
February 3, 201610 yr Author What I would like to happen is for the first tv show directory to get created within tvshows, for its contents to be rsync'ed, and then on to the next directory. OK, solved it! Here is how to do it: cd /mnt/user/media/tvshows/ for i in *; do rsync -av --progress --stats "$i" /mnt/user/media-temp/tvshows/; done; EDIT: Modified the above to work with directories with spaces in their names by using "$i".
Archived
This topic is now archived and is closed to further replies.