Best Practices for Syncing System Configuration Between Two Manjaro Systems?

Hello,

I’m trying to achieve the same configuration in two Manjaro systems, and I’ve attempted a few methods, such as installing dotfiles, using Syncthing to sync the home folder, and copying the home folder to a USB drive and then to the other system. While most configurations have been successfully synced, there are still a few system-wide configurations that haven’t changed, such as the default shell being bash instead of zsh. I don’t know all the configurations that haven’t changed, so I want to avoid manually fixing the default shell or other settings on the destination system.

Now, I’m considering syncing the root folder using the following command:

rsync -av --update / username@destination_ip:/

My questions are:

  1. Can I expect the system to break after running this command? I have Timeshift installed, so I can recover it if needed.
  2. Would it be best to stop complicating myself and swap the drives between the systems, leaving the old one with a similar configuration but not exactly the same?
  3. Is there a better way to do this, ensuring a smooth and successful configuration sync between the two Manjaro systems?

I would appreciate your insights and suggestions. Thank you!

Definitely. Timeshift may not help here, because in this way you probably overwrite snapshots. Copy only needed files, or change them by hand.

Yes. Be prepared ahead. Prepare and update your dotfiles repository regularly. For system-wide configs prepare script (or leave instructions how, what & why), prepare package list to install on new system. If you have any other files, images from holidays, work projects etc. – make backups on pendrive, any cloud storage (more backups, the better) and download them if needed after other setups.

Or don’t be prepared if you don’t have many custom configs (and you’ll be able to configure all of them in several minutes) or if you keep everything close to system defaults – you’ll change them by hand when needed. But backups for personal files is still a must-have.

2 Likes

I’d go for number 2. You might end up using the machines in different ways anyway.

For system-wide configs I agree with @Tomek … something I should put into practice myself (and try to stick with it :roll_eyes:).

I typically just transfer the hard disk, but note I don’t have nvidia graphics to deal with. If you clone it and use that in the other machine, you’ll have a decent starting point.

In the end, I had to leave it as it was because the computer wasn’t booting after swapping the drives, and I was afraid that syncing the root folder would have the same result. I also had some dotfiles that were supposed to give me the same config, but part of it I had to do manually because it wasn’t written properly. It’s what happens when modifying it without testing; it’s not like I’m going to reinstall Manjaro every time I change the dotfiles installation script to see if it works as expected.

There is also the option of Virtual Machines, where you can take snapshots, clone etc. and do your experimentation this way; much easier and quicker.

If this command copies /etc/fstab from one computer to another, you might have a problem because UUIDs probably will be different…

Take a look:

2 Likes