I'd like to backup my entire OpenIndiana installation using Restic. Which directories should I exclude?

On Linux and FreeBSD, there are some directories, such as /proc, that generally shouldn’t be backed up or aren’t worth backing up since a new installation regenerates them or generates their own anyway.

What are those directories for OpenIndiana?

Generally, you should use --one-file-system and explicitly list all of the physical filesystems that are part of the system (excluding external media, unless you want to back up their contents as well). If you only have one filesystem (/) then use that.

Ideally, you would combine this with snapshots at the filesystem level (btrfs, ZFS) or at the block level (LVM) to ensure a consistent point-in-time backup.

I must say, I never use --one-file-System. Because one time, when I used it, it happened to me that I added another volume to the machine and I forgot to add it to my restic command. So the new volume never got backed up.
I feel more safe backing up / and excluding for example proc, sys, tmp and var/tmp. So I can be sure that everything gets backed up no matter how my filesystem Layout changes.

1 Like

The counterpoints to that argument (or "why I use --one-file-system"):

  • The set of virtual filesystems is very likely to change on distro upgrades.
  • Leave your 8TB external drive mounted? Oops, now that’s backed up!
  • Did you rclone mount something and leave it mounted? Now your S3 bucket / FTP host / Google Drive / etc. is backed up! (Hope the egress cost from that service isn’t too high!)
  • Did you mount an encrypted filesystem? Now the decrypted contents are in your (encrypted) restic repository!

I’ve just developed the habit that any time I edit /etc/fstab I also check my backup scripts for any changes I need to make.

1 Like

These are absolut valid cases and Thank you for listing them as it will be helpful for considerations of others!

Why do you want to use restic rather than backing up encrypted ZFS snapshots?



@amuckart I wrote a guide on how to set up znapzend on OI earlier this month.

Also, I find encrypted filesystems a major PITA on anything that isn’t Windows or macOS so I don’t use them on OSes other than those 2.

Lastly, ZFS snapshots require a destination zpool, and not everyone has that, much less one that’s on a different machine, is big enough, and that even uses a compatible ZFS implementation.

You don’t need a destination zpool, you can just compress and encrypt the stream and save it to S3.

Thanks but I’m not interested in cloud as primary backup. I use offsite backups as last resort only. My OI installation is insufficiently critical for that level of protection.