rsync files recursively but place in one remote directory
i would like to find and backup all *.mp4 files from /Pictures and its sub-directories and move them to a single directory on a remote. I can find and move the files but I don't want the directory structure...just the files to be placed in the remote directory.
To find my files I use rsync -r -a -v -e "ssh -l user" --delete --include '*/' --include '*.mp4' --exclude '*' /home/drew/Pictures/ remoteserver:/Users/drew/mp4 but this creates all the subdirectories I also tried find ~/Pictures -name "*.mp4" -exec rsync -r -a -v -e "ssh -l user" --delete {} remote:/Users/drew/mp4 \; This works but takes forever Any suggestions? Thanks! |
How many mp4 files do you have? This might be a big factor if you're moving them all into one directory. It depends on what filesystem you're using, and exactly what rsync does, but I'm pretty sure that many operations on the directory will have a running time of O(N) or at best O(logN), so putting loads of files in one directory would have rather adverse effects.
Also, have you tried using 'scp' rather than 'rsync -r -a -v -e "ssh -l user"'? |
Thank you.
I have quite a few *.mp4 files and moving them into one directory isn't so much an issue for me on the remote machine. I have a video screensaver running on the remote that only looks for video files in a single directory. scp was/is an option but copies every file every time....I couldn't figure out a way to make scp NOT overwrite if the file already exists on the remote. |
Quote:
Quote:
Quote:
|
All times are GMT -5. The time now is 11:35 PM. |