Results 1 to 8 of 8
Hello All,
I am rsyncing some files to cloud for backup
one of the files has a long file name and has a ? mark in the name which makes ...
- 01-25-2012 #1Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
rsync issue
Hello All,
I am rsyncing some files to cloud for backup
one of the files has a long file name and has a ? mark in the name which makes rsync stop after failing to copy this file
i tried to copy it using the cp command but could not do it. it was intersting to see that the ? was translated as "at sign" in the cp command and at the end the output said that it could not copy the file because there is no such file or directory it was strangly and making the situation even worse , traslating the initial ? as / thus thinking that file 123?s2 has to be copied to 123/s2
anyways, i can change the file name however do you know how you can tell rsync to continue with the rsync regardless of any errors?
thanks
- 01-26-2012 #2
What does it report, if anything, when it stops? In my experience, rsync will continue after an error, it just won't execute a --delete option in that case (unless --ignore-errors is specified).
- 01-27-2012 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,954
Rename the file.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-31-2012 #4Just Joined!
- Join Date
- Nov 2011
- Posts
- 7
well the issue is that I can not rename the file, it is used by website and the file has ? in the name which can not be even copied to the destination using cp or scp so i guess the receiver does not accept that character.
i guess i am lazy and will also search google it but how can you tell rsync to sync a folder for example /1 but exclude 1/2 and 1/3. in another word tell rsync to sync a root folder but exclude some of its sub folder
I know there is a pattern command for this but don't think that will be very useful as there are no patterns but the absolute folder path
thanks to all posters
- 01-31-2012 #5
- 01-31-2012 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,954
To exclude stuff, simple use the "--exclude path-pattern-or-pattern-file". IE,
Do read the rsync man page or info file. They should tell you everything you really need to know.Code:rsync --exclude '/1/2' --exclude '1/3' --exclude file-with-patterns-to-exclude
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-31-2012 #7
We should all read the manpage. In RHEL5 at least, it's "exclude-from" for a file containing patterns The syntax given would exclude the file from the backup graph, rather than its contents. Since the manpage says "exclude=" and "exclude-from=", I also thought the example was broken without the equal sign. But it works fine without the =.
- 01-31-2012 #8Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,954
Ach... vell... I am running an RHEL 6.x based system, so as the saying goes, your mileage may vary! -) Since there are often such little inconvenient versionitis issues with software these days, checking for the supported syntax on your specific system is always a good idea!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote

