You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some combination of options which will keep a copied folder in the specified temporary location until its contents are written, then move the entire copied folder with its contents to the destination location?
From what I can see when using the --temp-dir option, rsync will copy a folder from the source, the "copied" folder will be created in the destination location while the contents of the copied folder will be held in the specified temporary location until the writing of the contents has finished. Then the files will be moved to the newly created folder.
This is the full command I am to test: rsync -a --bwlimit=1000 --temp-dir=/home/user/watchedDir/temp/ ./sync/ ./watchedDir/
~/sync/ contains a folder named new with a file example.mp4 inside, I want all of new copied to ~/watchedDir/. When I execute the command, a folder named new is created in ~/watchedDir/ and example.mp4.xxxxx is kept in ~/watchedDir/temp/ until its transferred then moved to ~/watchedDir/new/.
Perhaps my situation is odd, I am using inotifywait to trigger a script when a "moved_to event" occurs. Rsync does with individual files, but these folders are being created in the destination location and the contents are being moved into the folder later instead of moving the entire folder with its contents to the destination from the temporary location.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there some combination of options which will keep a copied folder in the specified temporary location until its contents are written, then move the entire copied folder with its contents to the destination location?
From what I can see when using the --temp-dir option, rsync will copy a folder from the source, the "copied" folder will be created in the destination location while the contents of the copied folder will be held in the specified temporary location until the writing of the contents has finished. Then the files will be moved to the newly created folder.
This is the full command I am to test:
rsync -a --bwlimit=1000 --temp-dir=/home/user/watchedDir/temp/ ./sync/ ./watchedDir/
~/sync/
contains a folder namednew
with a fileexample.mp4
inside, I want all ofnew
copied to~/watchedDir/
. When I execute the command, a folder namednew
is created in~/watchedDir/
andexample.mp4.xxxxx
is kept in~/watchedDir/temp/
until its transferred then moved to~/watchedDir/new/
.Perhaps my situation is odd, I am using inotifywait to trigger a script when a "moved_to event" occurs. Rsync does with individual files, but these folders are being created in the destination location and the contents are being moved into the folder later instead of moving the entire folder with its contents to the destination from the temporary location.
Beta Was this translation helpful? Give feedback.
All reactions