LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Restore (https://www.linuxquestions.org/questions/slackware-14/restore-660666/)

Ian J 08-05-2008 01:07 PM

Restore
 
Maybe a silly question but as a newcomer to Slackware i was just wondering if there is anything built in to the kernal or is there another way of restoring a system in the event of problems, rather like on a windows XP machine.

I know Slackware is very stable but even so i am sure that maybe after a failed software install or whatever, it may be advantageous to have something similar to windows.

Juat wondering, that's all.

Ian J

BobNutfield 08-05-2008 01:25 PM

First of all, Slackware isn't like Windows and as such you will not find or need a "restore" file. Your Slackware install CD is usually all you would ever need to restore a damaged system (has been for me anyway.) You, of course, should do regular back-ups of important data, but, unlike Windows, restoring a system from the likes of viruses and such just isn't necessary on Slackware. The kinds of breakages you will find in Linux are usually repairable from a system rescue cd (like your Slack install disk.)

T3slider 08-05-2008 05:17 PM

Should you ever need to install, upgrade, remove, or reinstall a package, `installpkg`, `upgradepkg`, `removepkg` and `upgradepkg --reinstall` are all you will ever need. Plus, all of the files in each package are listed in /var/log/packages, so it is easy to keep track of everything (assuming you ONLY install prebuilt packages instead of blinding running `./configure; make; make install` on application sources). I personally use SlackBuilds (either self-written or, more commonly, those of slackbuilds.org, Alien Bob's repository, rworkman's repository or sometimes slacky.eu), which create Slackware packages that can be installed using installpkg. Since NOTHING gets installed to my system until I issue `installpkg packagename`, there is virtually no chance of me messing anything up (and I usually check to make sure the package will not overwrite any existing files). That way, in the worst case scenario (ie if the app doesn't work), I can just issue `removepkg packagename`. If I somehow screw something up (like deleting a program file, for example), I can just issue `upgradepkg --reinstall packagename` and all is well again. Since Linux almost always keeps any user-based configuration in your user's home directory, a simple back up and restore procedure of your home directory should restore almost all configurations made.

In Slackware (and most Linuxes), if you trash your entire installation but have your home directory (and possibly /etc) backed up, you will probably be able to restore your system by reinstalling and restoring your home directory (and possibly /etc). The only outstanding issues would be self-installed packages (but I keep copies of my SlackBuilds and packages in my home directory, so I could just reinstall them from there).

If you back up a few key directories, you will never need a magical restore function that does who knows what to your system. Slackware is designed to be transparent and leaves system administration to you. I think this makes upgrades/reinstallations faster and less error-prone.

Woodsman 08-05-2008 06:04 PM

To answer your question, no, there is no such equivalent utility. However, there are two reasons you might want some kind of restore ability:

1. Recovering from malicious or poorly written software.
2. Recovering from self-inflicted mistakes.

As already mentioned, with Slackware you need worry little about the first reason. Do not install unknown software. The web is wonderful place to investigate the merits of any software package. Use only known trusted Slackware repositories and you'll avoid the first reason.

That second reason is a real challenge. What to do about wandering minds and fat fingers?

Learning some basic computer administration skills will help. Regular backups will help. Learning how a GNU/Linux operating system functions and differs from Windows will help. Protect user data by using a basic partitioning scheme that at least keeps /home on a separate partition. Learning some basic recovery skills and tools (such as using live CDs or boot floppies) will help.

Be patient. Learn at your own pace. If you are new to GNU/Linux, keep using your Windows box as your production or primary machine while you learn GNU/Linux with a second box, dual booting, or a virtual machine. A second box or virtual machine allows you to purposely make a mess to learn skills and test recovery techniques.

Oh, and have fun!

forum1793 08-05-2008 09:12 PM

Quote:

Use only known trusted Slackware repositories and you'll avoid the first reason.
Where are all of these?

Is http://www.linuxpackages.net/ a trusted source?

T3slider 08-05-2008 10:41 PM

Quote:

Originally Posted by forum1793
Quote:

Use only known trusted Slackware repositories and you'll avoid the first reason.
Where are all of these?

Is http://www.linuxpackages.net/ a trusted source?

If you search my posts you'll see a more detailed answer (I've stated this a few times and don't feel like retyping it all now). In short: I prefer using SlackBuilds to create Slackware packages. Pre-written SlackBuilds are available at slackbuilds.org. SlackBuilds and pre-built packages are available from Alien Bob's repository and rworkman's repository. I trust those repositories -- in part because Alien Bob, rworkman, and other contributors to slackbuilds.org are very knowledgeable and even contribute to Slackware itself.

There is also slacky.eu, which maintains a (large) repository of SlackBuilds and packages. If you can't find a SlackBuild/package at one of the other repositories, it will *probably* be here. I trust slacky.eu a little less than the other ones -- but I'm paranoid, and have never had a problem using their SlackBuilds (though I generally modify them myself). I would stay away from linuxpackages.net. There ARE reputable packagers there -- but finding them takes experience. A lot of their packages are built on unclean systems with questionable dependencies, and many packages do not include a SlackBuild (meaning you have no idea how the program was compiled -- and you're basically using blind faith that it will work).

Woodsman 08-06-2008 12:05 AM

Quote:

Where are all of these?
By and large Slackware is a DIY (do-it-yourself) distro. You won't find typical software repositories as you will with Debian, Ubuntu, Suse, Mandrake, Fedora, etc. What you will find are places to help users build their own packages. As mentioned, slackbuilds.org is popular although I use slacky.eu for packages not found at slackbuilds.org. I stopped using linuxpackages.net some time ago for the simple reason that many of the packages do not include the build script. That creates a trust issue for me. I dislike lock-in, even in the free/libre software world. As alluded by T3Slider, I'm guessing many Slackers get uneasy when source code and build scripts are not available for study.

I have 116 non-stock Slackware packages installed. All but about a half-dozen I built using the two previously mentioned sites. One of these days I hope to learn how to create build scripts. Time, time, time....

forum1793 08-07-2008 08:22 AM

Thanks for both responses.

My first attempt at making my own package was for dosemu. If I remember right I used the makepkg script but I could be wrong. In any event when installing my dosemu package, it deleted /bin and many other useful and required files and directories. Unrecoverable so had to reinstall.

I did somewhat successfully make a few packages and most recently did mythtv0.21 based on a build script I found, probably at one of two sites you mentioned which I had to mod a little. Didn't know what I was doing of course but got lucky. Later someone else produced a 0.21 script of package and so I switched the main from mine that one figuring it would be better than mine. Still using it but don't really see any difference.

I have a couple of problems that make building scripts difficult.
1. Lack of understanding of kernel and file permissions
2. Lack of understanding of bash or bsh or csh or whatever is used and related variables such as PWD.

Maybe if I get time I'll try to go through a few more of these.

Trusting the programs is an interesting topic. Programmers for the various packages are located all over the world. What would stop hackers, or even a criminal organization from intentionally submitting code or even entire programs? The script package writer is just another layer.

Ian J 08-07-2008 01:59 PM

Many thanks for all the very helpful advice, i now understand a bit more than i did before i asked this question, at present i have Slackware installed on an IBM T30, i am just playing with it at the moment until i learn a bit more regarding the way things are done, the next step is to install it on my file server which is setup for mirror raid so that will be a bit of fun especially securing it against attack from viruses etc.
Then the other Pc's and laptops will undergo the changeover one at a time, hopefully by taking things one step at a time i can get everything i want accomplished and should be able to learn a bit in the process.

Ian J


All times are GMT -5. The time now is 12:18 AM.