Backup in Ubuntu

Asked by Ron

I am trying to backup my files and folders and have read the relevant sections on

https://help.ubuntu.com/community/BackupYourSystem

At the end I really don't care if my backup software or system is GUI or CLI. I want however a few things to take place during backup and I find it confusing that Simple Backup Suite cannot do this:

https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite

1. I want a *bootable* backup of my entire Ubuntu system. In the event of a crash, I want to be able to boot directly from my external hd where I would like to store my backup.

2. I also want the backup to be *legible* to other operating systems. In the event of a crash, I would like to connect my external hd to my Apple iMac and be able to retrieve certain crucial files.

3. This brings me to the third point which is the format in which files are backed up in Simple Backup Suite, namely they're archived. If something is stored as "archived" material then would I not in fact need an Ubuntu system to retrieve the data? This would defeat the whole purpose of backing up your system. I would want my system to be *legible* to other operating systems. Moreover, if "archiving" means compression of files, then all my multimedia files (mp3, avi, image files) would be stored in a lower quality? or not stored at all? or what exactly?

I simply want a backup storage that in the event of a crash I would be able to plug it in to my other computers which run on Mac or Windows and access my movies, photos, mp3 files, documents, etc. Is this too much to ask for?

4. My current Ubuntu is part of a dual-boot setup on my laptop. The other operating system is Windows 7, which I rarely use. Still I would like Windows 7 to be backed up. Can I do using Ubuntu backup softwares?

Appreciatively,

Ron

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ron
Solved:
Last query:
Last reply:
Revision history for this message
marcus aurelius (adbiz) said :
#1

what you WANT isn't always what is possible.

1. you CAN'T boot a backup. if you want your backup drive to be bootable, you'll have to install an operating system on it. otherwise, you'll have to settle with booting from some other medium and accessing the backup drive from that

2. you CANNOT make backups *legible*. you can make it readable to the mac system if you format the harddrive using the mac format. i'm not sure if ubuntu supports the mac format. AND you MUST use a backup/recovery program that runs on BOTH linux and mac.

3. see #2 above. most backup system will archive the data using their own scheme. if you don't want it archived, you can do a straight copy backup. compressing audio and video data will NOT render them a lower quality.

It's not too much to ask for, but you're asking for the impossible if you're looking for something that's free. There are commercial programs available that will do what you want (cross platform), but they cost an arm and a leg.

4. yes it will

Revision history for this message
Ron (ronald17b95) said :
#2

Thanks for your response. Since I found almost everything that I do on Mac to be available in one way or another on Ubuntu/Linux as well (and oftentimes with more features), I naturally thought the backup softwares could also be comparable in this regard. But if your answers are the last word on the subject, I must say Mac Time Machine is a far superior backup software. It does all that I have mentioned above. The backup is bootable, it is also readable/legible in another operating system, and the data remain in their original formats (they're not archived).

Revision history for this message
Ron (ronald17b95) said :
#3

I am thinking of a possible solution:

1. If I install Ubuntu on my external hd, it would be bootable, no? Then I can perhaps backup my data to its "home" folder.

2. If I backup everything in its original formats, then everything presumably would be legible or at least readable/retrievable from another operating system, no?

4. Can you tell me how?

Revision history for this message
marcus aurelius (adbiz) said :
#4

no my word is not final. there are lots of different backup software available and there isn't a single software that will do everything you want it to do.

Revision history for this message
Ron (ronald17b95) said :
#5

Thanks for your response. What do you think of my other post, a possible solution that I thought about. Do you know how I can install Ubuntu on an external drive?

Revision history for this message
Ron (ronald17b95) said :
#6

OK I tried to backup through grsync but have got the following error message:

*** Launching RSYNC command:
rsync -r -t -v --progress -s /home/ranin /media/f95d4197-9f8c-4852-847a-8799d56d8fd3

sending incremental file list
ranin/
rsync: recv_generator: mkdir "/media/f95d4197-9f8c-4852-847a-8799d56d8fd3/ranin" failed: Permission denied (13)

*** Skipping any contents from this failed directory ***
sent 106713 bytes received 800 bytes 71675.33 bytes/sec
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
total size is 21222143121 speedup is 197391.41
Rsync process exit status: 23

Revision history for this message
mycae (mycae) said :
#7

If bootability is critical, you could simply dd (clone) your entire drive into another drive. This should be bootable.

the command would be

sudo sh -c "dd if=/dev/DISK | pv | dd of=/dev/OTHERDISK"

eg

sudo sh -c "dd if=/dev/sda | pv | dd of=/dev/sdb"

but make sure you get the disk labels right. Get it wrong, and you lose everything. read the dd manpage for details, with "man dd"

Advantages of DD:
* Bit for bit copy.
* bootable, if source was bootable.

Disadvantages
* Slow to backup, as it clones the ENTIRE disk, every time.
* Backup drive must be at least as large as the other drive.
* Not compressed.

As for booting of a mac, thats a separate problem, your imac might not even run an x86 chip, so there is no way (in that case) that you could expect the drive to boot. If it is the same chip architecture, then maybe. I'm not familiar enough with apple's boot procedures to really know.

Looking at what you are doing now, rsync works (so does "cp -R", btw ), rsync will be faster, as it will skip in the case of existing clones of the data. But you need to make sure that you can actually create folders on the external disk, which is what that error appears to be about.

If you want an easier way to backup with rsync than the CLI, I would recommend the unison-gtk package, which has a nice-ish point and click interface.

Revision history for this message
Ron (ronald17b95) said :
#8

Thanks so much for your always thoughtful responses. I wonder if you could
help me find a hard drive "format" which would be not only readable but also
writeable across platforms. I want something like a USB flash drive which
you can save a document and plug it in a Mac or Windows and access it and
modify it. What is the format of a USB flash drive by the way? Can I format
my external hd in a similar way? It seems ext4 is not legible in Mac. I also
don't want a format that would be only readable/writeable in Mac alone and
not in Linux.

Appreciatively,

Ron

On Sat, Jan 8, 2011 at 4:07 PM, mycae
<email address hidden>wrote:

> Your question #140667 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/140667
>
> Status: Open => Answered
>
> mycae proposed the following answer:
> If bootability is critical, you could simply dd (clone) your entire
> drive into another drive. This should be bootable.
>
> the command would be
>
> sudo sh -c "dd if=/dev/DISK | pv | dd of=/dev/OTHERDISK"
>
> eg
>
> sudo sh -c "dd if=/dev/sda | pv | dd of=/dev/sdb"
>
> but make sure you get the disk labels right. Get it wrong, and you lose
> everything. read the dd manpage for details, with "man dd"
>
> Advantages of DD:
> * Bit for bit copy.
> * bootable, if source was bootable.
>
> Disadvantages
> * Slow to backup, as it clones the ENTIRE disk, every time.
> * Backup drive must be at least as large as the other drive.
> * Not compressed.
>
> As for booting of a mac, thats a separate problem, your imac might not
> even run an x86 chip, so there is no way (in that case) that you could
> expect the drive to boot. If it is the same chip architecture, then
> maybe. I'm not familiar enough with apple's boot procedures to really
> know.
>
>
> Looking at what you are doing now, rsync works (so does "cp -R", btw ),
> rsync will be faster, as it will skip in the case of existing clones of the
> data. But you need to make sure that you can actually create folders on the
> external disk, which is what that error appears to be about.
>
> If you want an easier way to backup with rsync than the CLI, I would
> recommend the unison-gtk package, which has a nice-ish point and click
> interface.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/140667/+confirm?answer_id=6
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/140667
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Ron (ronald17b95) said :
#9

OK so here's what I am doing now. I formated my external drive in FAT32 which is I think the format used for USB flash drives. Then I backed up my data using rsync which is as you well know a folder synchronization program. Now, my data is completely readable/writeable on Mac and Ubuntu. Yay!

Revision history for this message
mycae (mycae) said :
#10

>What is the format of a USB flash drive by the way?
Normally these are formatted FAT32 or sometimes NTFS.

>I wonder if you could help me find a hard drive "format" which would be not only
>readable but also writeable across platforms

Unfortunately, no such thing exists in an unequivocal manner. Mac and windows have developed systems (HFS), NTFS, FAT etc, but each has its own strengths and weaknesses. Each vendor wishes to promote their own format and discourage interoperability in order to prevent people migrating from their systems. They will not implement file formats they do not control the specifications for -- simple as that.

Linux systems are usually vendor neutral, but best-effort, so sometimes features may be missing, as reverse engineering some of these things is a boatload of work.

In short, you can use FAT32, as most systems can read this, but FAT32 does not preserve permissions, and has problems with large files (>4GB). FAT is also extremely inefficient if regular random read-writes are being performed (not *so* bad if write once, read lots). Similarly NTFS, although capable of handling large files, has a much more complex (and just plain wierd) permissions system that is not compatible with standard UNIX permissions, so you still need to use the tar method of preserving permissions.

A full discussion on the merits of each system would be a large volume in and of itself; However, FAT probably does what you want, except it will mess your permissions up. If you create a tar-archive first, then the permissions are embedded in the tar-archive itself, so you don't lose them even when it moves to another disk type. Limitation here is that if your archive is >4GB FAT32 will simply fail. You could use NTFS in this case to overcome this, but you might not be able to read or write to an NTFS disk from mac (not sure, read seems likely, but possibly not. Write seems unlikely but possible).

Alternately, you can find third party implementations for ext readers under windows; though i think ext4 does not exist at this time, but ext3 does. I do not know of any ext writers for windows.

As a tenous euphamism -- mac and windows are spiteful neighbours, and will refuse to co-operate with anyone unless it benefits them. Linux just doesn't care and does whatever it wants. So, chances of getting interoperability here is pretty small.