APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > Mac OS X dd backup
Printer Friendly Version




News Group Posts

Mac OS X dd backup


Personally, this makes me a bit nervous. Unflushed disk buffers could mess this up, though apparently he's been ok with it

The system is running while this is dd'ing in either direction. Maybe *you* aren't doing anything, but background tasks are running, and I would think it would be easy to get the disk into an inconsistent state. Apparently that hasn't happened, but I would think that sooner or later dd'ing mounted drives is going to bite him. Were I going to use this, it would be in single-user mode only.

He's probably been lucky because buffers get flushed fairly quickly on a one user system. If he tried this on a multiuser system, it would almost certainly screw up his data somewhere. It may be doing that now; he might just not notice. Te fact that the system complained about "Your disk was not put away properly, there may be damage to your files" certainly shows that the system noticed a problem.

I would NOT do this!


From a comp.sys.mac.apps post.

Subject: Happy with image backup :)
From: Mark Conrad <nospam@iam.invalid>
Date: Sat, 09 Aug 2003 15:57:02 GMT

For those like myself who can't afford a raid backup system, the next
best seems to be working very well.

I have 105 backups to my credit so far, and near as I can determine the
105th backup is just as good as the 1st one.



All my applications work as well, all the configurations of my
applications are intact.

The  _good_  version 2.1.1 of DiskWarrior never complains when I use it
to check out the directory of my OS 10.2.6 after a restore operation.

I am getting so lately I don't even bother checking OS ten after a
restore, because by now I have a lot of faith in the restore operation.

All my files are packed in butt-tight after any five minute restore of
the 3.06 GBs of files in my present smallish OSX implementation.  No
fragmentation whatever of my files in the 12.00 GB partition I set
aside for OS-X.   That means the "heads" of my disk drive do not have
to whip themselves to death picking up ump-teen pieces of a scattered
file.

Less wear and tear on my disk drive.

On the down side, OS X seems to get "confused" by my restore
instruction, so temporarily (for the last 105 backups) I am ignoring
the onscreen warning that appears immediately after the five minute
restore operation:














"Your disk was not put away properly, there may be damage to your files"

I have tried everything to try to get rid of that warning, but nothing
works, so I will pass it off as a false warning.

After all, nothing dire has happened after 105 restores.

Below are the two one-line commands I use for backup and restore, the
individual pieces of these one-line commands are seperated by
semicolons, which tells the computer to execute all the pieces one
immediately after the other.



To Backup-


dd if=/dev/rdisk0 of=/Volumes/Util-4/OSX-Backup-8-2/Bak bs=524288
count=1000;dd if=/dev/rdisk0 of=/Volumes/Util-4/OSX-Backup-8-2/Bak2
bs=524288 iseek=1000 count=1000;dd if=/dev/rdisk0
of=/Volumes/Util-4/OSX-Backup-8-2/Bak3 bs=524288 iseek=2000
count=1000;dd if=/dev/rdisk0 of=/Volumes/Util-4/OSX-Backup-8-2/Bak4
bs=524288 iseek=3000 count=1000;dd if=/dev/rdisk0
of=/Volumes/Util-4/OSX-Backup-8-2/Bak5 bs=524288 iseek=4000
count=1000;dd if=/dev/rdisk0 of=/Volumes/Util-4/OSX-Backup-8-2/Bak6
bs=524288 iseek=5000 count=1000;dd if=/dev/rdisk0
of=/Volumes/Util-4/OSX-Backup-8-2/Bak7 bs=524288 iseek=6000
count=1000;dd if=/dev/rdisk0 of=/Volumes/Util-4/OSX-Backup-8-2/Bak8
bs=524288 iseek=24574 count=5




To Restore-

dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak of=/dev/rdisk0 bs=524288
count=1000;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak2 of=/dev/rdisk0
bs=524288 oseek=1000 count=1000;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak3 of=/dev/rdisk0 bs=524288
oseek=2000 count=1000;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak4
of=/dev/rdisk0 bs=524288 oseek=3000 count=1000;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak5 of=/dev/rdisk0 bs=524288
oseek=4000 count=1000;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak6
of=/dev/rdisk0 bs=524288 oseek=5000 count=1000;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak7 of=/dev/rdisk0 bs=524288
oseek=6000 count=1000;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak8
of=/dev/rdisk0 bs=524288 oseek=24574 count=5


The one-line  _backup_  command has never given me any problems, i.e.
the partitions of my internal drive never try to remount themselves.

The restore command is another story, all the partitions of my internal
drive remount themselves immediately after the five-minute command
finishes executing itself.

I temporarily tried the variation below to try to get rid of any
tendency of the partitions to remount themselves  _during_  execution
of the restore command:

dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak of=/dev/rdisk0 bs=524288
count=1000;umount -f /Volumes/OSX;umount -f /Volumes/Tiny;umount -f
/Volumes/OS9;umount -f /Volumes/Spare;umount -f /Volumes/Storage;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak2 of=/dev/rdisk0 bs=524288
oseek=1000 count=1000;umount -f /Volumes/OSX;umount -f
/Volumes/Tiny;umount -f /Volumes/OS9;umount -f /Volumes/Spare;umount -f
/Volumes/Storage;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak3
of=/dev/rdisk0 bs=524288 oseek=2000 count=1000;umount -f
/Volumes/OSX;umount -f /Volumes/Tiny;umount -f /Volumes/OS9;umount -f
/Volumes/Spare;umount -f /Volumes/Storage;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak4 of=/dev/rdisk0 bs=524288
oseek=3000 count=1000;umount -f /Volumes/OSX;umount -f
/Volumes/Tiny;umount -f /Volumes/OS9;umount -f /Volumes/Spare;umount -f
/Volumes/Storage;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak5
of=/dev/rdisk0 bs=524288 oseek=4000 count=1000;umount -f
/Volumes/OSX;umount -f /Volumes/Tiny;umount -f /Volumes/OS9;umount -f
/Volumes/Spare;umount -f /Volumes/Storage;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak6 of=/dev/rdisk0 bs=524288
oseek=5000 count=1000;umount -f /Volumes/OSX;umount -f
/Volumes/Tiny;umount -f /Volumes/OS9;umount -f /Volumes/Spare;umount -f
/Volumes/Storage;dd if=/Volumes/Util-4/OSX-Backup-8-2/Bak7
of=/dev/rdisk0 bs=524288 oseek=6000 count=1000;umount -f
/Volumes/OSX;umount -f /Volumes/Tiny;umount -f /Volumes/OS9;umount -f
/Volumes/Spare;umount -f /Volumes/Storage;dd
if=/Volumes/Util-4/OSX-Backup-8-2/Bak8 of=/dev/rdisk0 bs=524288
oseek=24574 count=5

I got onscreen update messages that the partitions were  _already_ 
unmounted, during execution of this temporary restore command.

The warning message about improper "put-away" still occured at the end,
so I gave up on the variation directly above.

I will just ignore the warning message.

Mark-


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?




More Articles by



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

pavatar.jpg

This post tagged:

       - Backup
       - MacOSX




Unix/Linux Consultants

Skills Tests

Guest Post Here