Which program will do a backup and restore? [Solved]

You have a problem with Salix? Post here and we'll do what we can to help.
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Which program will do a backup and restore? [Solved]

Post by paul »

Just had a nasty crash, an unnamed browser (not Firefox or Midori) did enough damage for Salix to cause it to boot with multiple errors and hang each time. Reinstalled Salix and it is running OK again; although many hours of setting up programs and writing shell scripts had to all be redone.
Is there any way to backup all data and programs to a pen drive, so Salix can be restored to "as good as" after such a disaster?
There are some backup programs available, but none of these automatically select the right files; which is not handy if you are new to Salix (as is the case with me).
Also, is there a way to repair Salix after such an event?
Any help would be appreciated.
Paul.
Last edited by paul on 7. Apr 2013, 07:04, edited 2 times in total.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Which program will do a backup and restore?

Post by mimosa »

The sort of thing you describe isn't really the Linux way: for all I know such an application may even exist, but would you trust it or really know what it was doing?

Conceptually, there are two sorts of things you want to "back up": data and settings etc. The data is easy, just back it up regularly to another medium. A good tool for this is rsync (with its GUI, grsync) and there is a lot of information on the web about how to use it.

As for your customisations, I would advise keeping clear written notes (hard copy) of all steps taken after installing. There will be some things it may be easier to copy (like browser settings, where for instance in the case of firefox, I think there is a whole directory somewhere containing everything from history to plugins) and you could include that in your backup. But just copying everything of that kind wholesale (such as your entire /home/user_paul, with both data and settings) is unlikely to work quite as you expect.

I actually wrote a script to do some of my tweaks automatically (at a period when I was doing lots of Salix installations) and bundled it up with some of the configuration files in a package; but it is still very much a work in progress. The trouble is, one keeps changing things, anyway, so it gets out of date and may be more trouble than it's worth. But I do keep my ratpoison (WM) and alpine (email client) config files securely inside my email account, so they can easily be downloaded: those two would be fiddly to recreate. In fact, in normal use, I think there is a case to be made that time spent doing it all again manually is well spent, because it gives you a chance to refine your ideas and do a better job. Anything major (you mention hours' worth of shell scripts) should be backed up.

Regarding your original incident - things like that shouldn't happen. Which browser was it? Was it from the Salix repos? It sounds as though something else may have been involved too. Just a crash shouldn't do that. Had you investigated the problem at the time (perhaps asking for help here), it's possible it could have been resolved reasonably easily.

Anyway, I hope lightning won't strike twice. :)
Last edited by mimosa on 14. Mar 2013, 15:54, edited 1 time in total.
User avatar
antmon
Posts: 130
Joined: 26. Nov 2009, 16:49

Re: Which program will do a backup and restore?

Post by antmon »

I would get another hdd and do a "dd" on the command line to do a perfect copy of that working hdd. In case of crash just swap the hdd.
Image
User avatar
f.bluedevil
Posts: 91
Joined: 9. Jan 2011, 23:06

Re: Which program will do a backup and restore?

Post by f.bluedevil »

I'm not sure what you mean by selecting exactly the right files etc., but if you are looking for something that will restore your entire system exactly to your last backup, you may want to look at Clonezilla. Clonezilla will create an image of your entire system, or if you prefer, you can select to back up by partitions. Think of an image as an exact snapshot of your entire system. It does not give you the granular type of control you can achieve with rsync, or one of it's graphical front ends like grsync or luckybackup but it will restore your system complete and whole with a minimal amount of fuss.

A good tool to have, that will allow you to use either or both, is "Parted Magic" which you can download from the internet and burn to a CD or DVD. It has both Conezilla and grsync in it's tool kit, as well as a host of other rescue and diagnostic tools. Also, both grsync and luckybackup are in the Salix repositories and can be obtained using either gslapt or slapt-get.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Which program will do a backup and restore?

Post by mimosa »

Regarding dd, I actually do use it for backing up Windows:

http://www.salixos.org/forum/viewtopic. ... kup#p16716

(howto and summary in the last post but one in the thread)

dd should be treated with extreme caution because if you mix up the input and output (which is suprisingly easy to do), you can cause considerable (even total) damage very easily.

Many of these methods involve the creation of large image files and so may not work with FAT on the backup medium.
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: Which program will do a backup and restore?

Post by paul »

Hi All,
Thank you for all that information, it is really appreciated.
I still run a couple of Windows XP machines for my home business as well as my two Linux machines which my wife an I use as our "work-horses" mainly for browsing the Web - mostly research - and word processing as well as other general tasks.
My Windows XP machines I back up with an older version of Norton Ghost, which compresses everything on a partition and saves it as a set of archives. As this program runs in Dos, I have a USB hard drive from which I boot into Dos and then run Norton Ghost and back it all up.
I have saved the day with this on a number of occasions, when there has been a hard drive failure, a nasty virus and failed memory which scrambled the hard drive.
Clearly in case of the scrambling of the hard drive by a wayward program, as I experienced a couple of days ago with this little Salix machine, a good backup that would shave time off the eight to ten hours it took me to get it all back up and going again, would have been welcome.
I presume a rescue CD would be the way to go, as I can back it all up on an external drive but compression is a must to make the backup file into a manageable size. I will have a look at Parted Magic with Clonezilla.
Paul.
sojurn
Posts: 41
Joined: 15. Aug 2012, 22:43

Re: Which program will do a backup and restore?

Post by sojurn »

paul wrote:Hi All,
Thank you for all that information, it is really appreciated.
Paul.
Just thought I'd add my two cents about what I do, since this is an area that I have thought about myself, am always open to a better way or to improvements.

I used PowerQuest Drive Image for years and years with Windows (DOS floppies, pre-Symantec). Then I guess since images are kind of in the blood looked for something similar in Linux, ended up using Parted Image (using a Parted Magic CD). I assume there are archiving programs which are better or more intelligent, but a simple image is just so fast. I restored a parallel Salix system just now from an image, one which includes my customizations and compiles as well as a few other things (ca. 800 mb all told), and even on my fairly old system that is only 2-3 minutes start to finish. So at the moment at least I always have a variety of images handy, along with notes for changes since a restore, since that is what I would have to redo. And that works and is very fast but it is also rather fixed, which is why I am open to ideas myself.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Which program will do a backup and restore?

Post by gapan »

paul wrote:the scrambling of the hard drive by a wayward program
This is not possible.
Image
Image
paul
Posts: 51
Joined: 25. Jan 2013, 11:15

Re: Which program will do a backup and restore?

Post by paul »

Hello gapan, since I do not live in the cyberworld of my computer, I was not there to observe directly what happened; so without taking divine intervention or some other supernatural force into account, I simply assumed this was the problem.
The program in question locked up the computer during an update, and when I could not activate any other aspect of Salix, I waited patiently for about 10 minutes. When nothing changed (even the screen saver did not show when it should have) I decided to manually reboot the computer. On that and on subsequent attempts to reboot, Salix no longer worked and just stalled each time after attempting to load a few files - all of which failed with errors - with all of the computer indicator lights flashing. I even turned the computer off several times for a time and started it up again, to no avail.
If the program was not at fault, what was it?
After a re-installation of Salix and having set everything back up the same way (minus the suspect program) it all runs perfectly, so hardware problems can be eliminated as a cause.
I am open to suggestions, after all I would prefer to avoid another occurrence of the same.
Paul.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Which program will do a backup and restore?

Post by mimosa »

What was the application (it would be helpful to know), and how did you try to update it? Where did you originally install it from?

It sounds to me as though you may have stepped outside the charmed circle of Salix's package management system, in which case all sorts of bad stuff could well happen.

In particular, if an application tries to persuade you to update something yourself from its website or by clicking on something that pops up within the application, don't. When an upgrade is abvailable from the repos, it will be installed automatically the next time you do a general upgrade. If you are using xfce, the Gsalpt panel icon will tell you when any upgrades are available.

Package management in Linux (as opposed to the windows model of download from anywhere,clck and install) is one of the main reasons why Linux systems tend to be more stable and secure.
Post Reply