I would like to use rsync as a backup solution; I am syncing the contents of my machine to an external hard-drive. If my machine crashes, I want to restore another machine as close as possible to the one I currently have, since I have downloaded and customized a whole bunch of software for my research. Reinstalling and customizing would take an enormous amount of time and effort.
When I run this dry-run command (replaced with real, but very long, file paths):
sudo rsync --dry-run -azv --delete --exclude-from '/exclude/list/file.txt' "/" "my/backup/location" I get the error
rsync: readlink_stat("/run/user/1000/gvfs") failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]I can of course avoid this error by excluding /run/user/1000/gvfs. In fact, upon exclusion, I get no more errors.
However, as I said, I want to be able to use this sync in the event that my machine crashes and I want the new machine to work just like the old (or as close as possible).
Do I need this /run/user/1000/gvfs? If so, how can I properly clone it?
Thanks
1 Answer
I don't include /run in my backups as its entire contents are wiped at every boot. Its contents only exist for the benefit of currently running processes.
The same applies to /tmp and /var/run. It is optional for /var/cache and /var/tmp in the sense that data in /var/cache and /var/tmp is preserved across reboots but can be deleted between boots with no consequences. So I don't include any of the above mentioned directories in backups.
In this case /run/user/1000/gvfs is not a normal directory and is placed into the directory tree by the FUSE system to contain mount points of current temporary disk mounts set up by a regular user, such as, for example, when plugging in a USB drive while in a graphical desktop. As with the rest of /run, you don't need to back it up.