Rest-server (or rclone) for Ubuntu-to-Ubuntu copy/backup?

I’ve recently acquired a new laptop (which I’ll call “NEW”) running Kubuntu 20.04.1 LTS, with c.6TB of SSD (LUKS encrypted) with restic 10.0.
My old laptap (“OLD”), Kubuntu 18.04.something LTS, with an almost-full 1TB HDD (LUKS encrypted) with restic 0.9.6. Both have gigabit LAN, etc.

I’m now deciding on a strategy for transferring all the files (including metadata) from OLD to NEW. Not the filesystems per se, just every single file (excepting stuff like device nodes and so on). I’ve been using *ix systems for c.40 years and know there are many ways of doing this, having done it before in a number of different ways (cpio(1) magtape, SFTP, physically moving the HDD, etc.). The difference in this case is both machines will continue to be used (albeit OLD needs some repair (not relevant)), so as an added plus, if the “copy” of OLD on NEW could also serve as an updateable/appendable backup, that is a very useful bonus. I use restic for my backups of OLD (to external (USB3) HDDs), but those particular backups are “partial” in that they are just of part (not all) of /home. (There are also backups of /etc & /boot.)

I note there is a “rest-server” which, at first glance, looks Very Very Interesting. Approach seems obvious: Run rest-server on NEW and backup from OLD over the LAN. (I am very aware the initial backup would take some time! Also, due to OLD being low on RAM, I may have to resort to several different restic repositories on NEW, with could also be beneficial for other reasons.)

Minor(?) glitch of the moment is I cannot find “rest-server” in either of the Ubuntu APT or SNAP repositories (“restic” on NEW was installed from SNAP (Thanks!)). Have I overlooked it? (I realise I could just use the pre-built rest-server binary on GitHub.) I’m not too familiar with Ubuntu “snap” so could easily have made a mistake.

Whilst searching for an answer, I noticed some people suggested “rclone”. I’m also not familiar with that, any opinions/suggestions…? (Sorry for the open-ended question!)

Thanks & cheers!

You need to separate concerns here. Syncing files from OLD to NEW is done by using e.g. rsync or rclone (I’d use the former), but this is a separate thing from backing up your data.

Are you intending to use both computers actively and change the same set of files on both of them? If so, are you really looking for ways to keep two machines using and changing the same files in sync, so that when you change files on NEW the changes are reflected on OLD? If so you need something like Unison or Syncthing - using a backup repository for this is not the right approach.

Restic is something you use to back up your data, not sync your data actively as it’s changing. REST-server is something you use to store the backups of your data. But neither is designed for the use case of syncing data.

Please answer the above, that will give us better information and enable us to give more relevant answers.

1 Like

Upon re-reading my question, I agree I was not clear: I am backing up OLD on NEW, not syncing. Changes on OLD stay on OLD unless and until they are either included in a subsequent backup, or I use some other mechanism (not restic) to sync (including sandalnet with a USB stick!). Any syncing would not be of the whole disc, probably just selected parts of my account in OLD /home (albeit that is currently speculative, since I am currently concerned about backup). Sorry for the lack of clarity.

So all you are asking is about using rest-server on NEW as a repository server for backing up OLD to? That’s a perfectly valid thing to do, yes.

Regarding finding the rest-server package in your operating system’s package manager, I cannot speak for that. We don’t maintain packages in e.g. Linux distributions, we only publish binaries ourselves. To get the latest version of rest-server, you can simply go download it at: https://github.com/restic/rest-server/releases - it’s a single binary that you run, no need to install anything.

Another option is to run Minio on NEW, which acts as an S3 backend. If you have no specific need to use either of them, I’d recommend using rest-server.

1 Like