LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2012, 02:19 AM   #1
kielmaru
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
How to backup Linux OS from a usb drive?


Im using linux mint 12 installed in a flash drive. But it always gets corrupted after a few boot. It suddenly wont boot and just goes blank. And I always feel frustrated because I already customized and installed apps in that OS.
So how can I back up my whole OS? Can I just copy all the files in the usb of my OS? Also, is it possible for a usb drive linux to last a little longer and avoid that blank screen os?
 
Old 03-02-2012, 06:30 AM   #2
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Can't be sure what you're problem is with the usb stick becoming corrupted.

Although, you can backup a whole operating system yes. The most suitable program would be `dd` which allows you to take snapshot type backups, literally cloning the whole disc image to a file.

You would want to boot from a different operating system (one that is already installed to your internal hard drive because files will change/movve around when the usb stick is in use as an OS).
For example if your usb stick comes up as /dev/sdc when it's plugged into the computer on your main operating system:
Code:
# dd if=/dev/sdc of=/root/backup.img
This would create a cloned disc image of your usb stick (kind of like an .iso file).
In the event you needed to restore it, you would simply swap the in-file and the out-file. So that it writes the image to the usb drive:
Code:
# dd if=/root/backup.img of=/dev/sdc
Make sure you write to the correct device.

When you use the program `dd` it literally copies byte for byte and will include all partition and filesystem information which can be useful for backing up an entire operating system.
 
1 members found this post helpful.
Old 03-02-2012, 05:20 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,968

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
dd is a common tool. Could go wild and compress it in the same line if you wanted.

Other command line tools exist too.


Might even consider things like clonezilla or redobackup or such. Even partimage may work.

The issue is more of why is the data not working correctly? Is this a live install or a real install?
 
Old 03-02-2012, 09:08 PM   #4
kielmaru
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Haven't tried what coralfang said yet since im still in my windows os. But thanks.. I hope it works.
Wait..
Quote:
For example if your usb stick comes up as /dev/sdc when it's plugged into the computer on your main operating system:
By usb stick, you mean the usb for backup? And I should stick it to the Linux OS? How would I know if it "comes up as /dev/sdc"?
You said that in the end, it would create an .iso file of my whole OS. So what if my original USB Linux OS wont boot up all of a sudden (i hope not), and I want to use my backup so i wouldnt start over again, how do I use the backup ISO? Do I just copy-paste it?

Quote:
The issue is more of why is the data not working correctly? Is this a live install or a real install?
You mean the usb not working correctly? I dont know. Maybe its the usb itself. So I changed my drive. I dont know what real or live install it.. But I used the universal USB installer from pendrivelinux.com and installed it in the usb drive with 1gb persistence..
Speaking of persistence.. Can I just copy the casper-rw to another drive for backup? (casper is the persistence right?)
 
Old 03-03-2012, 02:08 PM   #5
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by kielmaru View Post
Haven't tried what coralfang said yet since im still in my windows os. But thanks.. I hope it works.
Wait..

By usb stick, you mean the usb for backup? And I should stick it to the Linux OS? How would I know if it "comes up as /dev/sdc"?
You said that in the end, it would create an .iso file of my whole OS. So what if my original USB Linux OS wont boot up all of a sudden (i hope not), and I want to use my backup so i wouldnt start over again, how do I use the backup ISO? Do I just copy-paste it?

The usb stick/drive which contains your "bootable operating system". The example commands i gave would be run from another linux based distro yes. By /dev/sdc i meant to say that when you insert it into the computer it would be shown as /dev/sd[X] in dmesg output, so you would know which device to write the image file to when you need to restore it.

You wouldn't copy/paste the image file of a usb stick, you need to write it directly with the second example command i gave.

I assumed a secondary linux operating system would be used. Didn't notice that you posted from a windows machine at the time. To be honest, i haven't got a clue how you would do such a thing in windows... it's been many years since i last touched it.
 
1 members found this post helpful.
Old 03-03-2012, 08:32 PM   #6
kielmaru
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Oh. So I need another Linux os.. I don't know about that. And I dont want to boot again my usb linux because the 3rd boot from it, it wouldn't open it would be just blank. Its been my issue forever.

So I found this software, ReDo Backup. It backups your whole OS. I burned the ISO using unetbootin in my usb since i dont have a CD. But when I boot my Redobackup usb, it says "boot error".

So basically I have problems over problems. My usb linux can't be boot for 3 times, etc. etc.
 
  


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
which FS for 1TB usb backup drive? clifford227 Linux - Newbie 6 08-21-2010 11:31 AM
USB hard drive for backup? alhale Linux - Hardware 9 11-17-2006 08:31 AM
Backup software from harddrive to USB drive james91911 Linux - Software 2 09-10-2005 09:49 AM
FC1 USB drive backup linuxnube Fedora 9 01-08-2005 07:16 AM
IDE to USB drive backup with dd ? IIcx Linux - Newbie 1 04-11-2004 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:03 PM.

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