I want to perform a full backup of my system but there is hardly any information on how to do so using restic. The only clue I got was from the two blocks of code below which I found on this website and the official documentation.
Questions
I would like someone to point me in the right direction by answering the following questions.
-
What does the below flag --one-file-system mean in this context and where can I find documentation about it? I’ve tried ./restic help but its not there.
su -c 'restic backup --one-file-system --exclude /dev/* --exclude /lost+found/* --exclude /media/* --exclude /mnt/* --exclude /proc/* --exclude /sys/* --exclude /tmp/* --exclude /var/cache/apt/* /
-
Other than the values for --exclude, I don’t understand the rest of the syntax below. How do you read it? Its different to the usual restic -r backup .
root@a3e580b6369d:/# sudo -u restic /opt/restic/bin/restic --exclude={/dev,/media,/mnt,/proc,/run,/sys,/tmp,/var/tmp} -r /tmp backup /
This code is from the Official Documentation showing how to use restic to backup the whole system but there is no explanation on what the command means.
- If I wanted to do a full system backup that is equivalent to creating a system image will the following code work or is there something more elegant?
restic backup / --exclude={/dev/, /media/, /mnt/, /proc/, /run/, /sys/, /tmp/, /var/tmp}
Explanation: This reads as restic backup root where all my data is stored and exclude the following directories inside braces ({ }).
Suggestions
I think the documentation needs improving, restic works really well so far but sometimes code is just dumped in the documentation without any explanation of the syntax. A big incentive of backing up is to do a full system back up and restore so why is information about this largely missing from the official docs.
Lack of documentation increases the risk of making a mistake which would be very costly. Not everyone has the resources to fully test a full system back up of massive amounts of data so providing proper documentation is key. If it wasn’t for the massive red tape for opening non-development related issues on Github, I would have posted this there.