Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-23-2013, 01:19 PM
|
#1
|
Member
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213
Rep:
|
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}
The reasons these folders were excluded are over my level of knowledge, so I am unsure if it would be the same on Slackware.
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.
Last edited by Miranden; 11-23-2013 at 01:23 PM.
Reason: typo
|
|
|
11-23-2013, 01:45 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,370
|
"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
Last edited by jailbait; 11-23-2013 at 02:02 PM.
|
|
2 members found this post helpful.
|
11-23-2013, 02:05 PM
|
#3
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,284
Rep:
|
Quote:
Originally Posted by Miranden
This is the command they give [...]
|
Rules of thumb:
- Never apply blindly a command, whoever gives it
- Never run a command without full knowledge of what it is supposed to do
HTH some.
|
|
2 members found this post helpful.
|
11-23-2013, 02:26 PM
|
#4
|
Member
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213
Original Poster
Rep:
|
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.
Last edited by Miranden; 11-23-2013 at 02:31 PM.
|
|
|
11-23-2013, 03:19 PM
|
#5
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,284
Rep:
|
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.
Last edited by Didier Spaier; 11-23-2013 at 03:23 PM.
|
|
|
11-23-2013, 04:26 PM
|
#6
|
Member
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213
Original Poster
Rep:
|
Quote:
Originally Posted by Didier Spaier
Well, I didn't meant to minimize your knowledge (mine is pretty limited :-)
|
Ha! I hope one day my knowledge has the limits of yours. Don't worry, you didn't offend me, as it is impossible to minimize what isn't there. I know I know nothing, but I am trying to learn.
I will do that with the -H option. Going to start now. Thanks!
|
|
|
11-24-2013, 10:15 AM
|
#7
|
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Rep:
|
Quote:
Originally Posted by Miranden
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}
The reasons these folders were excluded are over my level of knowledge, so I am unsure if it would be the same on Slackware.
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.
|
Code:
-n, --dry-run perform a trial run with no changes made
Check it out.
|
|
|
11-24-2013, 11:41 AM
|
#8
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by jailbait
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.
|
If you recover from a disaster it is too late to make a backup, recovering from a disaster should be done with restoring the backup, not taking one. If you create a new backup you should do it from a known good system, which by definition means that you have a consistent filesystem with all parts where they belong to. On such a system lost+found will be empty anyways.
|
|
|
11-24-2013, 01:44 PM
|
#9
|
Member
Registered: May 2012
Distribution: Slackware 64 14.2
Posts: 213
Original Poster
Rep:
|
Quote:
Originally Posted by Habitual
Code:
-n, --dry-run perform a trial run with no changes made
Check it out.
|
Thanks. Can you tell me what practical information that gives me? What I needed to know was which folders I should or shouldn't include to have a working backup. It seemed to me that was an issue of understanding how Slackware works, not whether the rsync program was capable of copying things. Am I missing something?
|
|
|
11-24-2013, 01:50 PM
|
#10
|
Member
Registered: Jan 2008
Location: Berlin
Distribution: Slackware / Arch / Unix
Posts: 144
Rep:
|
Quote:
Originally Posted by Didier Spaier
Rules of thumb:
- Never apply blindly a command, whoever gives it
- Never run a command without full knowledge of what it is supposed to do
HTH some.
|
Big rule! It's like "The first rule of the fight club..."
|
|
|
All times are GMT -5. The time now is 01:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|