Is this rsync command appropriate for full system Slackware backup?
I want to make a full backup of my entire filesystem tree as described in the Arch wiki here:
This is the command they give for making the backup, excluding certain directories for various reasons that may or may not be specific to Arch: Code:
# rsync -aAXv /* /path/to/backup/folder --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found} Will this command make a good full system backup on Slackware? Is there anything else I would have to do to restore it, other than copying it back to the drive and updating the fstab? Thanks in advance. |
"The reasons these folders were excluded are over my level of knowledge, so I am unsure if it would be the same on Slackware."
Some of the excluded files are actually pointers into entry points in the kernel. The kernel sets them up on each boot so you don't need to back them up. Also if you try to copy a file which is actually a kernel entry point then the copy program will be denied permission to copy the file. The files in /dev are created by the kernel at boot by querying what hardware is present and creating device files for each piece of hardware. Backing up /dev is a waste of time. Whether you back up /mnt/* and /media/* is very dependent on how you have your file systems configured. Some people should do it, others shouldn't. lost+found contains file fragments placed there when fsck looks at a broken partition and finds file fragments that fsck does not know where they belong. I back up lost+found and I don't know why anyone would want to exclude lost+found in a backup. If you are recovering from a disaster some of your data may only be found in lost+found. /tmp contains files that by definition are temporary and non essential. Backing them up is a waste of time. You only have to update fstab if you have restored files to a different partition than they originally occupied. If you have to change fstab you also may have to reconfigure grub or whatever bootloader you use. --------------------- Steve Stites |
Quote:
|
Jailbait - Thank you! That is very valuable information. I think I know what I'm doing now.
Didier - Thank you also. I know what rsync and the flags do, I just didn't know what folders I should or should not include. Basically, although I understand the command, I have only shallow knowledge of the Slackware system. Since I expect the deepening of that knowledge to be a gradual process that occurs over time, I wanted to ask the experts here to make sure I didn't leave out something I needed or include something I didn't need. Beyond knowing not to back up the directory I have my external drive mounted to, I'm pretty much in over my head in that respect. :) |
Well, I didn't meant to minimize your knowledge (mine is pretty limited :-), my statements were rather intended for newbies who could happen to read this thread ;)
To be more constructive, I add -H to save some space in case of hard links. I took this habit as I maintain local mirrors of both 32 and 64 bit versions of the same Slackware edition and there are quite a bit of hard links in mirrors (e.g. from 32 to 64 bit versions when the file is actually identical in both) to save space and bandwidth. Of course that is probably less relevant for a backup of your own system but that doesn't hurt, me think. |
Quote:
I will do that with the -H option. Going to start now. Thanks! |
Quote:
Code:
-n, --dry-run perform a trial run with no changes made |
Quote:
|
Quote:
|
Quote:
|
All times are GMT -5. The time now is 11:16 AM. |