Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to exclude network file systems #1598

Closed
fallingrock opened this issue Jan 4, 2024 · 12 comments · Fixed by #1600
Closed

Add option to exclude network file systems #1598

fallingrock opened this issue Jan 4, 2024 · 12 comments · Fixed by #1600
Assignees
Labels
Discussion decision or consensus needed Documentation Feature requests a new feature Feedback needs user response, may be closed after timeout without a response

Comments

@fallingrock
Copy link
Contributor

fallingrock commented Jan 4, 2024

I'd like to be able to configure bit to ignore network file systems.

Use case:
In user space, I mounted a smb share on a remote system using a mount point in my home directory. BIT tried to back up that directory because I hadn't excluded it.

Obviously the work around is to exclude the mount point from the backup, but if a share gets mounted on a different directory, my backup's not know to exclude them.

It would be much better to have an option to exclude network file systems in general.

@buhtz
Copy link
Member

buhtz commented Jan 4, 2024

Dear David,
thanks for reporting this and your idea.

I am not convinced about the advantage of such a feature for the users. Currently it seems to be a special and rare case relevant only for a small amount of users. But let me try.

I am not sure If I understood the following sentence correct:

I mounted a smb share to a remote system using a mount point in my home directory
Did you mean that the smb share is on a remote system and you mount it to a mount point in your local home directory?

You also mention that the location of the mount point to change from time to time and the the share is not always mounted.

I am right so far?

@buhtz buhtz added Feature requests a new feature Feedback needs user response, may be closed after timeout without a response labels Jan 4, 2024
@buhtz buhtz added this to the 2rd release from now milestone Jan 4, 2024
@fallingrock
Copy link
Contributor Author

I mounted a smb share to a remote system using a mount point in my home directory
Did you mean that the smb share is on a remote system and you mount it to a mount point in your local home directory?

Yes, exactly that. I have a file system mounted at /home/myhomedir/smb4k/publicshare.

I can exclude all sub-directories of smb4k from my backup, if I remember to.

You also mention that the location of the mount point to change from time to time and the the share is not always mounted.

Yes again.

In this case, the last time I mounted the directory using mount.cifs and the point point of /home/myhomedir/mnt, but the next time I mounted it I used the smb4k utility which uses a different default mount point directory.

Since the mount point changed, and I wasn't paying attention, BIT tried to back it up even though I had excluded the mnt directory.

@fallingrock
Copy link
Contributor Author

fallingrock commented Jan 4, 2024

I wonder if it would be sufficient to use the --one-file-system option to prevent it from going into a network file system?

Update: I removed the mounted smb directory from my exclude list, and added the --one-file-system option as an additional rsync option, and it did what I wanted.

I have a workaround at the very least.

@buhtz
Copy link
Member

buhtz commented Jan 4, 2024

Great. You contributed to the docu with this Issue. ;)
It should go into the FAQ.

But I am not sure if we should add this as an "Expert Option" to the settings dialog.

@buhtz buhtz added Documentation Discussion decision or consensus needed GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues HELP-WANTED Used by 24pullrequests.com to suggest issues labels Jan 4, 2024
@emtiu
Copy link
Member

emtiu commented Jan 5, 2024

--one-file-system may have consequences beyond network mounts, such as local loop mounts (of the encfs type) or tmpfs mounts.

But for users who know what they are doing, I think this might be a useful option to present in the "Expert Option". I can see myself using it in certain situations.

@fallingrock
Copy link
Contributor Author

I'm in the process of roughing in the changes needed.

I'm a complete newbie when it comes to python (I focus on Java & RPG), but I'll take a swipe at it.

TBH, this will be my first contribution to a GitHub hosted project, so I may struggle with the process.

@buhtz buhtz removed GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues HELP-WANTED Used by 24pullrequests.com to suggest issues labels Jan 16, 2024
@buhtz
Copy link
Member

buhtz commented Feb 2, 2024

Dear David,
it seems to me that you are in the middle of fixing this at fallingrock:one-file-system. Am I right?

Feel free to ask for help, feedback or testing.

You also don't have to be finished to open an PR. Setting a PR to Draft is possible and we can easier see and monitor code changes. Just if you want.

@fallingrock
Copy link
Contributor Author

fallingrock commented Feb 2, 2024

Unless there's something that needs to be fixed, I think it's done.

I've marked the ticket closed.

@buhtz
Copy link
Member

buhtz commented Feb 2, 2024

Unless there's something that needs to be fixed, I think it's done.

I can not decide it yet because we need to review your contribution. It is a regular step in our development process to review each others code.

To make this happen we need a PullRequest (PR). Please open such a request.

I've marked the ticket closed.

From the viewpoint of the "official" Back In Time repository (sometimes named "upstream") the problem is not solved yet until the code is merged into the primary dev branch. Because of that I will keep the Issue open until your solution is merged.

Is this OK for you?

@buhtz buhtz reopened this Feb 2, 2024
@fallingrock
Copy link
Contributor Author

I thought I did create a PR: #1600

@buhtz
Copy link
Member

buhtz commented Feb 2, 2024

I thought I did create a PR: #1600

Ah, yes. Next time you open a PR please add the Issue number in the opening text of that PR. Then a link is established.
I saw you referenced the issue in the commit message on git-level. In that case this issue is linked to the commits only but not to the PR.

@fallingrock
Copy link
Contributor Author

Ah, yes. Next time you open a PR please add the Issue number in the opening text of that PR. Then a link is established

Got it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion decision or consensus needed Documentation Feature requests a new feature Feedback needs user response, may be closed after timeout without a response
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants