Levi Durfee

Best CLI tool for backups

Backups are an important part of maintaining a server. You never know when your hardware might fail. It doesn't even need to be your hard drive that fails.

For example, if you have a server in a datacenter and your RAM fails, and you don't have any on-site, it might take a few days to get that server back online. If you have backups, you might be able to get some of the core services back online while you wait for your new RAM.

I'm focusing on Linux utilities since Windows isn't a real server OS.

restic

You can stop reading now if you want. The only tool you need is restic. It handles deduplication in a really cool way and uses AES256 encryption. It's very fast. I currently use it to backup about 50tb of data. And it's written in Go. I love Go.

They haven't released a version 1.0.0 yet. This annoys me. The project is over 10 years old.

restic

rclone

It's an amazing tool. Written in Go. It's very stable and supports lots of storage destinations. It's resilient and reliable.

I started using age and rclone together, only to discover the author of age actually uses restic for encrypted backups.

One thing that amazes me is that rclone keeps an encryption key in their code. They use it to obscure your encryption keys. This is so your encryption keys aren't sitting in plaintext on a machine somewhere. But, this isn't much better since the key is public.

var (
	cryptKey = []byte{
		0x9c, 0x93, 0x5b, 0x48, 0x73, 0x0a, 0x55, 0x4d,
		0x6b, 0xfd, 0x7c, 0x63, 0xc8, 0x86, 0xa9, 0x2b,
		0xd3, 0x90, 0x19, 0x8e, 0xb8, 0x12, 0x8a, 0xfb,
		0xf4, 0xde, 0x16, 0x2b, 0x8b, 0x95, 0xf6, 0x38,
	}
)

obscure.go.

rclone

rsync

I still use rsync to move files around a local network. It's pretty good for simple tasks.

rsync

Conclusion

Here is my ranking for backup tools.

  1. restic
  2. rclone
  3. rsync
  4. scp
  5. cp

#backups #best #cli #tool