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 06-07-2015, 02:23 PM   #1
tellyman69
LQ Newbie
 
Registered: Jun 2015
Location: Birmingham UK
Distribution: Linux Mint 17 Qiana XFCE
Posts: 7

Rep: Reputation: Disabled
Smile Creating a full system backup larger than 4GB (eg to USB)?


Hi all, new to the forums, but been a Linux user since 2009. I use Mint 17.

Having tinkered and fiddled to create my 'perfect' Linux environment, I'd like to back it up to a bootable device, to include all my tweeks (hardware, themes, software apps etc). I've successfully done this in the past to DVD with Remastersys, and I'm aware of Clonezilla, but they seem tied to the 4GB iso size limit.

Now that my 'perfect' system is around 8GB, is there any way to create a bootable backup that can handle that size, such as to a large capacity USB memory device? I have a big external drive to simply copy the whole system over file-by-file, but it would be nice to have a re-installation disk/device. (I've Googled much without any promising solution.)

Many thanks. Andy.
 
Old 06-07-2015, 04:01 PM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,704

Rep: Reputation: Disabled
You can use dd, it will do a block by block backup of your disk to a file on your other disk, you will need to run this from a 'live' system. (You may have to be the root user.) Be very careful about your if & of designations.
Code:
dd if=/dev/<your-installation> of=/<your-mounted-disk>/<filename> bs=1M
(see man dd)
 
1 members found this post helpful.
Old 06-07-2015, 05:20 PM   #3
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
dd is the way to go for this, I agree. You will make a bit-by-bit copy of your disk, and put it into a file on the destination disk. You restore the file to a disk, which will be bootable, again using dd. Read the manual for dd carefully. As fatmac said, you can't do the backup while you're booted into the system, you'll need to boot from another drive, and run dd from there, with both the drive to be backed up and the destination drive connected.
 
Old 06-08-2015, 06:04 AM   #4
tellyman69
LQ Newbie
 
Registered: Jun 2015
Location: Birmingham UK
Distribution: Linux Mint 17 Qiana XFCE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you for the speedy advice folks. Heard of dd but not yet used it, so I'll have a crack and report back in a day or two.
 
Old 06-08-2015, 06:30 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,691

Rep: Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264
One may consider using dd and then pipe it to a compression. May select more advanced compression types and options to force better compression. dd doesn't always work however. Your perfect system may have some unique references to this drive and may have to edit to generic.

I assume they are only tied to the 4 gig limit on fat usb maybe? Try different format on usb.


You can use other tools too that only copy file by file. Remember that clonezilla basically uses common programs that you can use.

http://www.tecmint.com/linux-disk-cloning-tools/

http://lifehacker.com/5891933/the-be...-app-for-linux

One one os I used to use I could do a cat /dev/(forgot exact path) to file.

Last edited by jefro; 06-08-2015 at 06:31 PM.
 
Old 06-08-2015, 07:39 PM   #6
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,308

Rep: Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566
word of warning when using dd to backup a drive first its sloooooow as it does a bit for bit copy, second on restore which is even slower the disk you are restoring to will be made into an EXACT copy so if you try to restore to a larger disk, ie if you are moving drives. the disk will get truncated so you would then need to expand the drive back out to its formaer size with the possibilty of lost data, which is always a ( small ) risk when resizing a disk, there are better ways of doing a backup than dd, though it does have its uses, I do use dd to back up my raspberry pi card cos i'm lazy at times!
 
Old 06-08-2015, 08:44 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,691

Rep: Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264
Keith Hedger is correct and warns of this. dd is a command that has no oops button.
 
Old 06-09-2015, 11:27 AM   #8
JeremyBoden
Senior Member
 
Registered: Nov 2011
Distribution: Debian
Posts: 1,025

Rep: Reputation: 203Reputation: 203Reputation: 203
Don't use dd this will take forever!
It will copy byte on your disk.

Investigate rsync.
It will copy every file the first time it is used.
On subsequent occasions, it will just copy any changes that have been made.

There are no effective size limits on Linux file systems.
 
Old 06-09-2015, 11:36 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,308

Rep: Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566
Quote:
Originally Posted by JeremyBoden View Post
Don't use dd this will take forever! ...
I thought that's what I said
 
Old 06-09-2015, 12:15 PM   #10
JeremyBoden
Senior Member
 
Registered: Nov 2011
Distribution: Debian
Posts: 1,025

Rep: Reputation: 203Reputation: 203Reputation: 203
Sorry.
 
Old 06-09-2015, 12:16 PM   #11
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,051

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
i use dd on my 32 gb fedora live-usb (because i have yum installed everything i'd like) and it takes about 3 hours on this cheap (1.6 ghz atom/1 gb ram) pc.
Code:
dd if=/dev/zero of=tmp.zero; rm tmp.zero
dd if=/dev/sdb bs=2048 | bzip2 > fc-20.iso.bz2          # to create the image
bunzip2 -c fc-20.iso.bz2 | sudo dd of=/dev/sdb bs=2048  # to restore the image

Last edited by schneidz; 06-09-2015 at 12:20 PM.
 
Old 06-09-2015, 01:00 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,989

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
mind you IF the usb thumb drive is STILL the factory default ( Microsoft long name) Fat32 format
4 gig IS THE MAX!!!! file size you can put on it ( well 4 gig minus 1 bit)

reformat it to a LINUX!!!! format
ext4 is a good choice

then but the back up on it
 
Old 06-09-2015, 01:17 PM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,324

Rep: Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730
I saw remastersys mentioned in the original post but no mention since. I've only played with it briefly but I understand it to be, roughly, a tool which could create a live distro or, more germane to this topic, an installer which would re-create an existing system. The problem with dd as a backup is that UUIDs change and, in some cases, some other things do -- so a customised installer sounds a better fit, to me.
So, my question, since remastersys is dead what is the replacement and does it allow for installer images of any size or does it limit them to DVD and, as a corollary, are the images isohybrid?
 
Old 06-13-2015, 08:34 AM   #14
tellyman69
LQ Newbie
 
Registered: Jun 2015
Location: Birmingham UK
Distribution: Linux Mint 17 Qiana XFCE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for the suggestions folks, all good valid suggestions.

However, when I looked more at Clonezilla and dd, a bit-for-bit copy didn't seem to be quite what I was after. (piping compression in dd looks interesting but a little complex - I'll have a go another time.) My OS drive is 250GB, and I wanted to ISO just the filesystem (since trimmed to 7GB) to a 16GB USB pen drive - more than big enough for the filesystem, but not for cloning a whole drive of largely empty space.

So I went back to remastersys which, despite being obsolete, did the job fine. I trimmed my apps to get the total filesystem to 7GB, and remastersys created an ISO of 2.7GB - a compression ratio of around 2.5:1 which easily fits on a DVD. (I then realised with that compression ratio there had been no need to trim my apps! Doh!) The resultant DVD boots just fine, with all my lovely themes and preferences intact.

ISO creation time about 20 minutes. Write to DVD about 5 minutes (always using a slow x8 speed - faster speeds risk more DVD errors in my experience.)

But I did some learning, so a big thank you to you all.

I guess I mark this as solved.

Last edited by tellyman69; 06-13-2015 at 08:41 AM. Reason: afterthought
 
1 members found this post helpful.
  


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
How Do I Copy Files larger Than 4GB? stevest SUSE / openSUSE 3 12-09-2007 09:54 AM
mkisofs with files larger than 4GB daihard Linux - Software 6 10-26-2006 04:08 AM
Full system backup. Terroth Linux - Newbie 11 06-21-2005 01:52 AM
full System Backup czezz Linux - Software 10 05-08-2005 02:50 PM
full system backup dbc254 Linux - General 6 12-26-2003 10:27 PM


All times are GMT -5. The time now is 07:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration