Giter Site home page Giter Site logo

Comments (8)

cytopia avatar cytopia commented on May 25, 2024 1

I also always run it as root. I will dig in on how to be able to continue when rsync has errors.

from linux-timemachine.

m4p1e avatar m4p1e commented on May 25, 2024 1

I suggest that tool should give warnings to these fails and continue working. Because that is really annoyed, the backup will never finish...

from linux-timemachine.

silverdr avatar silverdr commented on May 25, 2024

Another situation:

rsync: send_files failed to open "<path_to_file>/04B81CFC0A0102ABs": Permission denied (13)
rsync: send_files failed to open "<path_to_file>/19228148A9E5D347s": Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

and backups stop being created.

from linux-timemachine.

cytopia avatar cytopia commented on May 25, 2024

which had 0000 permissions set

With this permission it is expected that a user (non-root) is unable to read the file.

handled more gracefully

What should be a suitable behaviour for the backup solution, while still letting the user know, that something has not been backed up?

from linux-timemachine.

silverdr avatar silverdr commented on May 25, 2024

What should be a suitable behaviour for the backup solution, while still letting the user know, that something has not been backed up?

That's obviously a good question. "Thinking aloud" - first that comes to my mind is to mark the directory with "_errors" at the end of its name, and placing a text file named the same as the failed backup dir plus "_errors.txt" next to the directory. To keep it simple, the file might contain just the stderr output like the one I posted above (I assume it's stderr output). This way it would be immediately clear that not everything went 100% correct but the errors wouldn't prevent backups from finishing, potentially leading to data losses.

from linux-timemachine.

jschwalbe avatar jschwalbe commented on May 25, 2024

Came here to report the same problem. Had a directory that was causing the following error:

rsync: opendir "/home/ob1/docker-configs/tandoor/postgresql" failed: Permission denied (13)
IO error encountered -- skipping file deletion
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
2022-12-29 22:57:15 timemachine: [ERROR] timemachine Backup has failed

I had to chown it to my user (instead of root). Nevertheless, this error stopped a whole bunch of data/files from being copied, and had been doing so for about 20 days. Yikes!

  1. I would agree that this could be handled more gracefully. (At least continue to copy the other files.)
  2. I clearly need some checks and balances to see if the process is running to completion; do you have any suggestions?

Thanks!

from linux-timemachine.

jschwalbe avatar jschwalbe commented on May 25, 2024

Whatever docker container I've got doing this, seems to keep making root owned files. Don't like it, but I'm resorting to running linux-timemachine as root otherwise it never finishes.

from linux-timemachine.

TylerRick avatar TylerRick commented on May 25, 2024

I had a file owned by root with 000 permissions, too, on a shared hosting server I was backing up...

---------- 1 root        root        280 Mar 22  2022 /.../.htaccess.cpmh3129

Even though it aborted early with this error:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [generator=3.2.7]
2023-09-27 12:21:53 timemachine: [ERROR] timemachine Backup has failed

, it appears that it continued copying files into the in_progress dir.

While I was a bit disappointed that it aborted the entire huge backup and said it "failed", over 1 insignificant file which I wouldn't have cared if it was skipped, I can see how this script can't know whether a file failing to copy meets the user's idea of a "successful" backup or not. It depends entirely on which file(s) it is and how important that file is to the user.

I wouldn't be opposed to a "--allow-failed-files" option or similar that allows them to override the default behavior and consider it a success even if one or more files failed. Hopefully the user is monitoring the stderr output anyway, to watch for any warnings or errors. That way they would both be aware of the problem (to fix it for later backups) and have the backup considered successful and permanently saved in the regularly scheduled timestamped backup dir.

But I think it would be better if users would use excludes/filters to simply skip any problematic files so they don't cause any error in the first place... (With #81, however, it sounds like it may not always be possible to know which files will be problematic ahead of time.)


Since it is a shared hosting account where I don't have root, I couldn't simply change the permissions as the OP did; I needed a way to exclude those files from the transer, similar to #64.

I ended up passing --filter='dir-merge /.rsync-filter' to the rsync command (see MR #86 for proposal to auto-add that, to make it easier for people to exclude problem files ) so that I could add a .rsync-filter file with - .htaccess.cpmh3129 in the source tree.

from linux-timemachine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.