LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 02-08-2009, 03:09 AM   #1
tictoc
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Rep: Reputation: 0
Restoring from Suse Backup


Hi. Using the software i have and not too quick on picking things up, i'm using/learning OpenSuse 11.1 and need a simple backup/restore.

I have got my system nice and smooth, used the built-in backup utility, and saved to /tmp.backup.tar.

After doing this i thought i'd copy the backup files to another drive but i get the error- 'could not read /tmp/backup.tar'. Trying to save the same file(s) to DVD i'm told 'i cannot as i don't have permission to copy the files'

3 questions arise....

1. Why the system cannot read the files to copy to another drive (which i have read/write permission for).

2. How can i gain access that would allow me to copy the files to DVD.

3. Is it possible in the event of a system failure (if i cannot boot to desktop but can get to command line), access the backup file(s) to initiate a recovery and what would the commands be?

Regards
 
Old 02-08-2009, 03:49 AM   #2
Prlwrlczkwsky
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
Never trust a running system to make a backup of itself.
At the moment, I use Puppy-Linux booting from a USB-stick to image backup my 16Gb system disk (openSuse 11.1) twice a day to a 2.5Gb compressed file.
(Make sure Puppy Linux does not use your swap file if you keep it on the system disk.)
For simplicity, I use the Pudd utility that comes with Puppy for the backup because it zeros the unused diskspace before compressing.
Otherwise it amounts to
Code:
dd if=/dev/sdc ibs=4096 | gzip > /mnt/sda1/Mtron.Pudd.gz conv=noerror
For restauration I prefer
Code:
dd if=Mtron.Pudd.gz | gunzip | dd of=/dev/sdbc
You may find the awesome dd expalantion on this forum useful and fun to read.

Last edited by Prlwrlczkwsky; 02-08-2009 at 08:53 AM. Reason: Typo
 
Old 02-08-2009, 05:34 AM   #3
tictoc
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply but i don't want to keep bouncing between distro's (different people, different distro's thing). I've tried other distro's and they all give different problems, i need to settle with one and find OpenSuse pretty easy to install/setup.

OpenSuse and Ubuntu/Kubuntu are the only distro's i found that recognise and configure my Nvidia 9800+ and 2 monitors on install. Typically Mandriva and Fedora both require me to have a headache to get past the black/white screen after a reboot.

Regards
 
Old 02-08-2009, 06:13 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Prlwrlczkwsky is suggesting using a live distro or a usb distro to perform the backup of your OpenSuSE installation, so that the system isn't running when you do so. He wasn't suggesting switching distros. You could do the same thing if you downloaded and burned OpenSuSE's live distro.

At first you said that you saved the file as /tmp.backup.tar. Next you said /tmp/backup.tar. Can I assume the first was a typo?
Could you give us a long listing of the file: ls -l /tmp/backup.tar. It may have root only read permissions. Please double check the permissions on the file. Copy and paste any error messages so we can see exactly what the error was. Are you certain that you didn't get an error message about not being able to write to destination? You should be able to copy it if you su'ed to root first or used sudo.
example:
su -
cp /tmp/backup.tar /media/backupdisk

or
sudo cp /tmp/backup.tar /media/backupdisk

---
note:
To use sudo, you may need to run "visudo" once and uncomment the line:
# %wheel ALL=(ALL) ALL
by deleting the "# " characters at the front of the line. Also make yourself a member of the wheel group in the YaST2 users dialog.
---

You can't copy files to a DVD. You can burn a dvd using K3B or another program and add it. Maybe I just misunderstood what you meant.

---

If you used "mv" instead of "cp", and the immutable bit is set, even root wouldn't be able to move the file to another drive. The immutable bit needs to be cleared first.
 
Old 02-08-2009, 11:17 AM   #5
tictoc
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Yes there was a typo which i should have picked up when re-reading through prior to submitting, the correct filename is '/tmp.backup.tar'

I've been a windoze user since win95 so i'm struggling somewhat alone with Linux, and am relying on pot-luck and forums to gain answers, but i must admit it's the answers in forums sometimes i'm having problems with, because as you know (an assumption), someone who uses or used Linux for a long time see's a question and thinks wow that's an easy one, why can't the guy see it, that guy is me and just doesn't 'see it' until it's explained in plain english, or short and sweet without the vaugaries of Linux-speak.

Sorry i don't mean to go off on one but hopefully you can see my side of it. In windoze i just copy/paste a file and/or put it where i want. With linux i have to deal with e.g. 'Permissions'.

Quote..........................

note:
To use sudo, you may need to run "visudo" once and uncomment the line:
# %wheel ALL=(ALL) ALL
by deleting the "# " characters at the front of the line. Also make yourself a member of the wheel group in the YaST2 users dialog.

Endquote.......................

What is 'Visudo', Should i know that command? Should i know how to do that stuff afterwards, what is the 'wheel group'? I've never seen mention of that before on forums.

When trying to burn to DVD i select the file in K3B, it then gives the error 'Insufficient permissions to read the following files:
/tmp.backup.tar'.

'If you used "mv" instead of "cp", and the immutable bit is set'.

Ummmm

Regards
 
Old 02-08-2009, 01:38 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
/tmp.backup.tar is a very odd location for a backup file to be. It is best to keep the root directory clean. But what the hey! I've put my distro's DVD image there in the past so who am I to talk.

Please post a long listing of this file:
ls -l /tmp.backup.tar

Look at any attributes:
lsattr /tmp.backup.tar

Yes, visudo is a program. First check if you are a member of the wheel group:
Code:
> groups
jschiwal wheel dialout audio video xok users polkituser pulse-access
If not, go to YaST2, select the "Security & Users" icon, and then the "Users & Group Membership" icon. That will bring up the configuration dialog where you can add the "wheel" group. For some distros the first user is added automatically to the wheel group.

Then to configure sudo, run:
Code:
su -
<enter root password>
visudo
Delete the "# " characters from then line I mentioned earlier. ( 1) Cursor to the start of the line. 2) press delete twice. 3) press the keys ":wq" to save your changes. ( Thats colon w q, don't type the quotes. ). Now in the future you can run a command as root by entering "sudo " before the command. This is safer then using "su -" to become root.

---

Some more questions. Which directories did you configure to backup? Don't simply backup the root directory (/), as this will cause problems.
Directories to exclude:
/proc
/sys
/dev
/tmp
/mnt
/media

The /proc and /sys directories are psuedo directories, and trying to back them up will save a lot more than you realize. For example, all of the system memory, and the entire filesystem. If you included /proc before, the backup may have failed and you should start over.
The /sys directory is similar. It gives users and apps access to system information. It is created on the fly and isn't a read filesystem.
The /dev directory is created when you boot. It will be created the same way after you backup & restore, so backing it up doesn't make sense.
The /tmp directory is for temporary files. You can configure SuSE to delete the files here during reboots. Saving these files is a waste of time and backup drive space.
The /mnt directory is where you mount filesystems. If it is an internal drive you are mounting, you could backup the subdirectory it is mounted on, but you don't want to mount shares, the Cd or DVD or externally mounted drives.
The /media directory is where removable drives are automatically mounted. Probably including an external drive you might use to save the backup on. Also the DVD or CD you inserted.

---
If you got read or I/O errors when trying to copy it, then you could have a drive that is going bad.

Last edited by jschiwal; 02-08-2009 at 01:41 PM.
 
Old 02-08-2009, 01:41 PM   #7
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by tictoc View Post
Yes there was a typo which i should have picked up when re-reading through prior to submitting, the correct filename is '/tmp.backup.tar'

I've been a windoze user since win95 so i'm struggling somewhat alone with Linux, and am relying on pot-luck and forums to gain answers, but i must admit it's the answers in forums sometimes i'm having problems with, because as you know (an assumption), someone who uses or used Linux for a long time see's a question and thinks wow that's an easy one, why can't the guy see it, that guy is me and just doesn't 'see it' until it's explained in plain english, or short and sweet without the vaugaries of Linux-speak.

Sorry i don't mean to go off on one but hopefully you can see my side of it. In windoze i just copy/paste a file and/or put it where i want. With linux i have to deal with e.g. 'Permissions'.

Quote..........................

note:
To use sudo, you may need to run "visudo" once and uncomment the line:
# %wheel ALL=(ALL) ALL
by deleting the "# " characters at the front of the line. Also make yourself a member of the wheel group in the YaST2 users dialog.

Endquote.......................

What is 'Visudo', Should i know that command? Should i know how to do that stuff afterwards, what is the 'wheel group'? I've never seen mention of that before on forums.

When trying to burn to DVD i select the file in K3B, it then gives the error 'Insufficient permissions to read the following files:
/tmp.backup.tar'.

'If you used "mv" instead of "cp", and the immutable bit is set'.

Ummmm

Regards
I hope I can give some help .
Windows as you use it at home is a single user system.
So if something goes wrong it just come down to you.
Linux is a multi user system it can also be used as a server.
So a common user is different from root or su or a sudoer.
To do certain thinks you need to become root
About ALL the commands they mention to you ask for a terminal
and type man visudo and you get a explanation
man stands for manual
or visudo help
 
Old 02-08-2009, 02:49 PM   #8
tictoc
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Original Poster
Rep: Reputation: 0
@ jschiwal...............

Please post a long listing of this file:
ls -l /tmp.backup.tar

-rw------- 1 root root 1304832000 2009-02-06 23:32 /tmp.backup.tar

Look at any attributes:
lsattr /tmp.backup.tar

lsattr: Permission denied While reading flags on /tmp.backup.tar

Yes, visudo is a program. First check if you are a member of the wheel group

barry : users dialout video
groups: wheel: No such user

In Yast2 i have 'Users and 'Groups' tabs, but nothing that says 'Wheel'. Sorry i don't understand that part. Am i to add myself to the 'Groups'? Can i just use the Terminal in super user mode instead?

Which directories did you configure to backup

The only one in your list was /sys that was excluded.

I didn't get I/O errors...

1. The system could not read the files (/tmp.backup.tar)
2. The system refused me access as i didn't have permission.

@ ronlau9............

Thanks for the heads up. I really would like Linux to replace windoze, but linux is obviously not as user friendly as an experianced user would have a beginner think. I understand using 'Man' gives me access to information, but it's knowing the information beforehand is most of the solution, and even though i have the time (i'm retired), i'm not sure if i really need/want to learn arcane DOS-like commands to use linux.

It's taken me like forever to be able to play music/audio books without distortion (eventually dumped Amorok for Banshee), some of my collection of AVI's still display a green vertical stripe down the left side of the display (haven't figured that out yet), but i'm slowly getting there.

Backing up is hopefully the only way i can go forward in relative peace. The alternative is to write everything down about what i installed, what it was called, where i got it from, and in what order i installed to get where i am now, that's before i can reformat/re-install linux.

Using linux I have discovered 'The user time zone' again, where 'one minute' last one hour, 'almost finished' means all morning, and 'I'll finish this and go make a cup of tea' means i don't drink for 6 hours.


Man that sounds like another rant, i'm really sorry about that, but thanks for your inputs guys

Regards
 
Old 02-09-2009, 04:02 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
OpenSuSE has a wheel group. I've been using SuSE for years.
Run the "Users & Groups" YaST2 dialog. Select your username. Select the "Edit" button. Click on the "Details" tab. Select the Wheel group in the "Additional Groups" section.

Change the permissions on the file before running k3b so you can read it as a normal user.
Code:
sudo chmod go=r /tmp.backup.tar
or

Code:
su -
<enter-password>
chmod go=r /tmp.backup.tar
When you are done, you can clear the g & o permission bits with
Code:
su -
chmod go= /tmp.backup.tar
Having only root being able to read or write to a backup file is actually a good idea if you have other users. You might consider creating an encrypted partition on an external drive and saving the backups on it to prevent personal items like email addresses or credit card information being readable from a backup.
 
Old 02-09-2009, 04:18 AM   #10
tictoc
LQ Newbie
 
Registered: Feb 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your time and patience

Regards

Last edited by tictoc; 02-09-2009 at 04:21 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restoring X11 from backup-- HELP! philwynk Linux - Newbie 10 01-23-2008 02:34 PM
Restoring from rsync backup a_l_a_n Linux - Software 3 09-12-2007 01:13 PM
Restoring from an rsync backup of / eldoran Linux - General 3 04-25-2006 11:34 PM
restoring /etc files from tar backup hdagelic Linux - General 1 09-24-2003 07:04 AM
Restoring backup dominique Linux - Newbie 3 12-06-2001 02:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration