Feature request: Sync USB install with HDD/SSD install

I am enjoying NomadBSD on my Dell laptop. I also found having the entire OS installed and usable on a thumb drive is also quite convenient while traveling. It would be great to have a simple means of syncing the two, to update changes from one to the other whenever the USB were plugged into the laptop.

I have used rsync for backups, but I am concerned that the differences between the USB OS and the SSD install on the laptop might present problems. I am not expert enough to write a script to enable the USB to sync to the SSD and vice-versa. A simple application or gui would be appreciated.

You could try Syncthing.

Using rsync (or Syncthing for that matter) is only going to do you any good for “data files”. I don’t think you can sync your entire home folder with settings and all. It will eventually result in a broken state unless you wait for all of it to be synced before boot/login.

The more robust and complicated option would be to some how sync-and-verify before the login process. I’m not sure how do do that either. It probably need to be some sort of startup service and a UI for options/disk selection. Kind of like the initial setup process.

If you stick to just the USB then the problem is solved and you can make a few bucks of the SSD on Ebay. :wink:

I know this is a bit old but have you found any solutions that fit what you need yet?

I haven’t. I did not spend too much time trying, though. I think I could write a script to update the user files and folders using rsync, but I’m not expert enough to be able to sync up the entire system.

It sure would be cool if I could plug my USB in to my laptop and have the two sync up automagically.

One of the projects that I’m working on requires a feature similar. Once I get it working and tested I can make a few tweaks and share a version of it. The only thing is that the code would be in Python. Maybe I can write it to check dmesg and look for a usb to be plugged in. If you don’t care what language it’s in then let me know and I’ll start looking into making the proper adjustments. No guarantees but it’d be interesting to work on.

A feature like this I will categorize along with backups:
Something that has to run automatically and not to be run manually.

Otherwise it wont be run as often as it should…
If you just once forget to run this program(feature), you have an (extensive) merge case on your hands.

Just my 2 cents :slight_smile:

The only thing is that the code would be in Python.

Does the language choice really matter? Or how the application code, functions and takes are implemented? I would tend to the latter. As a user, I don’t care in which language it’s written in, as long as it works flawlessly.

As a dev, I would pick a language that is easy and joyful to work in and gets your job done as quickly as possible. Python is a great choice here because it meets these above requirements.

I could offer you some help if you need it. I’m somewhat proficient in Python, Fortran and D although I haven’t coded that often. The last time I coded was for a college pre-project for a bachelor thesis project (I never attended) on which I gave up because it was too daunting to finish up the required algorithms.

Nonetheless it’s better if many people work on a project to finish it up quicker, eh? Let me know if you accept or decline this offer.

It depends on the person from my experience. Some people don’t want to have to go through installing a new python version and stuff like that. I’ve done some work for people who wanted it in a language they are good with too. That way they can make changes or see how it works.

Yeah, I’d appreciate it. I"m doing well learning Python. Started in basic, moved to C/C++ and decided to go with Python next. Seems really nice to use. Especially coming from C++.

Yeah, I’d appreciate it.

Cool! If you don’t mind sharing the (GitHub/GitLab/Codeberg/custom git/mercurial/SVN(Lite)/(Anon)CVS) repo with me I’d be glad if you did so.

I"m doing well learning Python.

Nice. How’s your progress so far?

Started in basic, moved to C/C++ and decided to go with Python next.

I myself started with Python and a little bit of R in college, although I’ve surely mostly forgotten my skills about the latter, then learned C by attempting to write a clone of the kilo text editor by the author of the Redis DB library then learned the nuts of Fortran (1990/95/2003/08/18) and later on the basics in D which to be honest were fairly easy to pick up because of my vast knowledge in Python and Fortran (although my algorithmic coding skills could be vastly improved at this point).

Seems really nice to use. Especially coming from C++.

Absolutely but you had an unfair advantage vs my college me: You learned BASIC and C/C++ before. Imagine you learned it from the get-go just like I did in college. Not that easy but in the end surely rewarding.

I apologize for the long response time.

Yeah, I’ve had a few more advantages in learning programming languages. Especially starting at a young age where the brain is still pliable.

Currently it isn’t on a repo yet. Once I get some time I’ll strip it of anything specific to the current project and put it on github and send a link. Work has been crazy so I haven’t had time for much lately. Really should’ve gone down the professional developer path instead of the job I’m currently doing.

> Work has been crazy so I haven’t had time for much lately. Really should’ve gone down the professional developer path instead of the job I’m currently doing.

Yeah, me too, although I kind of like the job (biologist) I currently do.

> Currently it isn’t on a repo yet. Once I get some time I’ll strip it of anything specific to the current project and put it on github and send a link.

Nice. I gladly await you sending me the link to the repo.

At least that’s an interesting subject to be in. I’m a postman at the moment.

Ok. Just want to run some tests once work isn’t too busy. Don’t want to put out bad code.

Haha, don’t stress yourself out. Put it out when you feel ready to open it.