0

This question sounds a tad vague but I'll lay it out rather clearly with some requirements:

  • Each laptop should contain the same files in the home folder.
  • User accounts should be identical.
  • Identical Applications would be exceptional.
  • Application Configurations must remain identical.
  • RSync or something similar sounds obvious but my IP changes frequently and I want my machines to continue to synchronize minimum daily.

Really what I'm looking for is: A laptop that I can use in case my primary breaks. This would be exceptionally useful for my work and personal life, I have numerous older laptops that are by no means fancy but I could probably roll with it so long as there are as few changes as possible. Downtime is my enemy.

How can I mirror and synchronize those requirements between two laptops automatically and at least daily?

Edit: Emphasis on automation and on the fly. Other questions on AskUbuntu are suggesting backups and mirroring my disk, this would be great if DD worked on the fly over rsync maybe.

Tmanok
  • 231
  • I synchronize (rsync) my wanted files with an NFS share, and just do the reverse when I want to update files on a newly installed box to get that newer install to a manner I like. When originally setup I used cron to automatically do that, but preferred doing it manually now as I save it when I want, but also use it should I stuff something up (I just erased the directory & rsync data from NFS back & try to my change again; and didn't want to have to consider the time should I get called away by cron jobs). Manually also allows multiple setups (one for QA-testing, various desktops etc) – guiverc Feb 05 '20 at 00:54
  • Note: prior comment relates to user files only, including config files for desktops. – guiverc Feb 05 '20 at 01:00
  • This needs to happen on the fly and automatically, Karel. rsync is great for files, could probably cron it with ease. Also can rsync delete files on the destination that have been removed from the source? – Tmanok Feb 05 '20 at 16:35

1 Answers1

0

If you have onedrive, you can use the onedrived service for linux. I'll link it below.

Basically you need to setup one laptop how you want it and installed onedrived then configured, clone the drive to an image and restore that image to another computer.

Configure Onedrived to use your home folder as the "Onedrive" folder. Onedrived will work by keeping your files you have in your home folder backed up online. Once you bring the other laptop online, it will then download everything you had back to your new computer. Once you fix your primary laptop, it will then re-sync any updated files to that laptop.

https://github.com/abraunegg/onedrive

Roxana
  • 76
  • Hey Roxana, I'll take my own Seafile Server any day over one drive. Also it doesn't solve the issue of maintaining identical applications across my machines. – Tmanok Feb 05 '20 at 16:36
  • 1
    In that case, you need to create a snapshot which wouldn't really keep it 100% synced as you'll have to have them run on a scheduled time. Something like timeshift would be what you need. – Roxana Feb 05 '20 at 17:01
  • Also, if you have an LVM partition setup, LVM supports snapshots. – Roxana Feb 05 '20 at 17:05
  • Timeshift would be awesome except that it does not support remote locations. Is there a way around this? Additionally, LVM Snapshots are created within the same volume group (vg), all of this is suggesting that these snapshots can be transferred to another machine(s) without damaging the links or by tricking the file system into believing that it is still linking to the same files. – Tmanok Feb 05 '20 at 17:48
  • timeshift can support remote locations if you can mount the remote locations to a local location. If you can "mount" a connection to your seafile server to your location system and can browse it, it would work. (I know NOTHING about seafile) You can use an network drive as well. If you did LVM, then you could still automate an upload I'm sure...

    "Seafile supports periodical backup via mysqldump and rsync. It also supports read-time backup via running a dedicated server to get backup from the primary server at near real-time manner.."

    – Roxana Feb 05 '20 at 18:39
  • Hey Roxana, ok so research shows "Timeshift does not support remote locations". LVM is as far as google has told me, in the same boat which makes sense regarding links- it's the same reason why Apple TimeMachine and DejaDup use compressed block based files or as Apple calls them "Sparse Bundles". Hard links don't work over AFP/SMB and especially not over SFTP (sadly). iSCSI or NFS might work but they demand high bandwidth. – Tmanok Feb 05 '20 at 22:31