bit-team / backintime

Back In Time - An easy-to-use backup tool for GNU Linux using rsync in the back
https://backintime.readthedocs.io
GNU General Public License v2.0
2.02k stars 198 forks source link

Invalid argument (22) (NTFS target drive) #1854

Closed fallingrock closed 5 days ago

fallingrock commented 2 weeks ago

I was helping a co-worker setup BIT on his laptop. When he ran it the first time, he got a 'Invalid argument (22)' error.

Turns out his backup drive was formatted as NTFS.

I'm thinking it would be a good idea to add a check, on the destination directory, to ensure it's a compatible file system.

The question is, what constitutes a compatible file system?

I think the error 22 comes from trying to use certain characters in file names.

buhtz commented 2 weeks ago

Yeah, that is a known issue. We might need to check this somehow. See #478

Technically NTFS does support hardlinks. But I am not sure if rsync can handle that. It also depends on how the NTFS drive is mounted. This needs some research.

It seems to me it is not a good idea to check for the filesystem type. It might be better to just run rsync with a small test setup and check if hardlinks created or not.

fallingrock commented 1 week ago

Technically NTFS does support hardlinks.

I think ntfs actually does support hard links ... there are some characters it doesn't support though. https://unix.stackexchange.com/a/632731

buhtz commented 1 week ago

Technically NTFS does support hardlinks.

I think ntfs actually does support hard links ... there are some characters it doesn't support though. https://unix.stackexchange.com/a/632731

So we can say to our users that NTFS is not supported because rsync is not able to handle it, no matter that NTFS itself offer hardlinks.