Skipping backups of VMs

Greetings! I’ve been using Restic for a few years now, on my Solus OS system. (In fact, I wrote a tutorial for the Solus forum, showing everyone how to set up and use Restic.)

I also use VirtualBox VMs quite a bit, and it annoyed me that backups of my home directory were taking so long because of those VMs, which didn’t need to be backed-up, because they all use snapshots to return to a valid state in case of any problems with the current state.

I joined this forum to find out if there were any way to skip those VMs, and before I even asked, it occurred to me to try researching restic backup --help instead. (I hate asking unnecessary questions!)

Indeed, I tried adding -e "/home/user name/VirtualBox VMs" to my backup alias in .bashrc, and tried a backup, with wonderful results. A backup that used to be minutes long finished in just a few seconds. Recommended for anyone else who uses VMs, and hasn’t figured this out for themselves!

1 Like

Did you know you can use an exclude file? While we’re at it, here are some of my excludes (I’m on Manjaro Cinnamon btw.):

.Trash
.cache
Downloads
.local/share/Trash
.vagrant.d
Virtualbox\ VMs
1 Like