Sponsored by Sony Pictures
Do you believe the 2012 Mayan Prophecy? view!
whowillsurvive2012.com - The Mayan Calendar predicts the end of time: 2012. See the trailer for 2012, opening November 13.
63 Comments
- 3242130193, on 11/21/2008, -1/+12I never thought tar was a great way to create backups. Usually cpio or rsync is better (cpio if it's a one-time thing or rsync if you're going to backup multiple times) because they do a better job of preserving timestamps, permissions, etc. Other alternatives could be something like partimage for full restores.
Also, if you use those commands, it's probably better to use the j flag instead of z. j invokes bzip2 compression and z invokes gzip. Using bzip2 will give better compression (which you'll probably need cause your file is going to be BIG). It does take longer too though. - inactive, on 11/21/2008, -0/+7http://unxutils.sourceforge.net/
- Y0tsuya, on 11/21/2008, -2/+8The 70's called. They want their tape backup software back.
There are multitudes of free synchronization software that work much better than tar for system backup. - csarak, on 11/21/2008, -0/+5You're an idiot.
If you don't know Linux, please don't try that command. - mickstephenson, on 11/21/2008, -0/+5I've heard of people using Subversion to create a constant rolling backup of any changes, but that is total overkill IMO
- lopla, on 11/21/2008, -1/+6srsly.. ubuntu + remastersys = a clone of your system on DVD that is bootable from any machine. has saved my ass a few times.
- zncdr, on 11/21/2008, -0/+4@RedRummy, rsync?
- groverblue, on 11/21/2008, -0/+4man tar
- mikelieman, on 11/21/2008, -0/+4Like 'rsync', for one.
#!/bin/bash
# Sticking:
# rsync-backup.sh >> logfile.txt 2>&1
#
# into your crontab should take care of this. As long as everything's hooked up.
# There is NO error checking for say, the presence of the backup drive.
PROGNAME=$0
STARTTIME=`date`
TARGET="/media/backup-00"
EXCLUDES="/root/etc/rsync-backup/excludes.conf"
DEVICE="/dev/sdf1" # where's the veritechs?
RSYNCOPTS="-av --delete --delete-excluded --exclude-from=$EXCLUDES"
SOURCES="/boot /etc /home /root /usr/local /var"
echo -e "nn--------------------------------------------------------------------------------"
echo -e "n$STARTTIME: Running $PROGNAME"
echo -e "n$STARTTIME: Beginning rsync backup of data to portable drive."
echo " Backup up directories: $SOURCES"
echo " to: $TARGET"
echo " with rsync options: $RSYNCOPTS"
echo
echo "---- Mounting Portable Drive ---"
mount -v -t ext3 $DEVICE $TARGET || exit
echo
echo "---- Mounting Windows Hard Drive ---"
mount -v -t cifs //windowsbox/c /mnt/tmp-windowsbox/ -o ro,ip=aa.bb.cc.dd,password=example || exit
echo
echo "---- Beginning Sync Operation ---"
date
rsync $RSYNCOPTS $SOURCES $TARGET
echo
echo "---- Ending Sync Operation ---"
date - mikelieman, on 11/21/2008, -1/+5"What REAL backup software offers is a level of granularity, coupled with efficient (delta) techniques that let you choose the backup you want without wasting 99.9% of your backup storage on redundant data"
Media is cheap. Loss is expensive. What's a TB of USB? 150 bucks? - spyd3rweb, on 11/21/2008, -3/+7Backups are for pussies, real men restore their hard drives with a magnet bit by bit.
- HonoredMule, on 11/21/2008, -0/+3You might want to give Nexenta a try. It makes an awesome file and backup server, and would even make a great desktop OS if it weren't for the poor hardware support.
But if you can keep 99% of your data in one place and just use samba or nfs a lot, it's the perfect solution. - tetsuo29, on 11/21/2008, -0/+3Time Machine + Time Capsule
Turns those 'oh *****!' moments into 'who gives a *****' moments. Seriously. - smotpoker, on 11/21/2008, -0/+3"I never thought tar was a great way to create backups. Usually cpio or rsync is better"
Plus rsync doesn't back up everything every time, only files that have changed or been added etc (depending on options). That often makes it way faster than the other backup options and less wear-n-tear on the drives over time. I don't think cpio does that (though to be honest I've never used it) - 47f0, on 11/21/2008, -3/+6No, it's not a great alternative. It only gives you a shotgun copy. To decide whether you want last Sundays, or last Tuesdays copy, you must archive and date full backups for both days, which is hugely wasteful - most of the files will not have changed between Sunday and Tuesday. What REAL backup software offers is a level of granularity, coupled with efficient (delta) techniques that let you choose the backup you want without wasting 99.9% of your backup storage on redundant data.
- mgbuddy, on 11/21/2008, -0/+3I started with cpio 23 years ago on old SCO Unixes. Never get used to the weird option handling. It's the most alien command for a Unix that I ever saw. (Well, that and "dd").
At that time we used cpio because it handled the splitting of backup files to be able to backup on 1.4Mb diskettes. (No I'm not THAT old, just started very young).
But as soon as tar supported that, cpio went the way of the dinosaurs for me... - saejinn, on 11/21/2008, -3/+6Awesome free alternative to costly and unneeded backup software.
- etx313, on 11/21/2008, -0/+3Well it does stand for Tape ARchive
- boobsbr, on 11/21/2008, -2/+5tAPE arCHIVE, is that hard do remember?
- boneit, on 11/21/2008, -0/+3"p.s. What the ***** is up with this comment box resizing itself when I type?"
That's the digg dance. Annoying isn't it! - RedRummy, on 11/21/2008, -0/+3@47fo such as....
- Culyt, on 11/21/2008, -0/+3Using 1.4Mb disks make you old? I thought it was only the 720k or larger ones ☹
I use rsync often
rsync -xav, just remember exclude /proc, /mnt/, /tmp and such
☢ - mikelieman, on 11/21/2008, -0/+3The inevitable evolution of this thread:
5-1/4" floppies....
8" floppies....
We chiselled it into granite with our penises... AND calculated CRCs mentally while doing it. - tnoy, on 11/21/2008, -2/+4If it werent for the CDDL and GPLv2 incompatabilities, I'd just use RAID-Z on all my machines.
Having RAID-1/5/Z on all my machines now, I haven't bothered creating a backup of my whole system in a long time. (other than my important files I can't otherwise recover from a 'oops i didn't mean to delete that')
p.s. What the ***** is up with this comment box resizing itself when I type? - Zaggynl, on 11/21/2008, -0/+2Does your spamming upset the general public? Leave now!
- seventhc, on 11/21/2008, -1/+3rsync is the way to go. rsync also doesn't copy redundant files it only copies what has changed since the last backup.
Here is a good link which is actually for a mac but its the same or similar on Linux.
http://www.jwz.org/doc/backups.html
I'm pretty sure this guy knows what he's talking about. If not for him you wouldn't have Mozilla. - inactive, on 11/21/2008, -4/+6I stopped using the tar command when i stopped smoking.
- nybble41, on 11/21/2008, -0/+2For backups to anything but a tape drive, dar ("disk archive") is a better fit than tar. It supports random-access restores, inode-only catalog files, incremental archives, extended attributes, file-level gzip and bzip2 compression, and archive encryption. You can find it here:
http://dar.linux.free.fr/
Make sure to keep the static binary (dar_static, in the "dar-static" package in Debian) alongside your backup sets to simplify restoration. - Chris_F, on 11/21/2008, -1/+3make an bit for bit hard disk image with "dd if=/dev/sda of=/mnt/sdb bs=4096 conv=sync" assuming your have two identical serial drives.
- seventhc, on 11/21/2008, -1/+3I provided a link while the previous comment was just stating the fact without showing any examples. If you dugg me down, I doubt you read the article from my link.
Well, I thought it made for a fast and interesting read. - tnoy, on 11/21/2008, -0/+2I stopped reading at "use a film camera"
- Culyt, on 11/21/2008, -0/+2So you can focus everything at one to ensure you get the full overall effect?
- t71E, on 11/21/2008, -3/+5Dugg for the thumbnail
- pentalive, on 11/22/2008, -0/+2I use:
dd if=/dev/sda of=/dev/sdb
So If my hard drive actually fails I can just swap in the backup drive and be right back
to the moment of backup.
I do this by booting from a live CD (usually an ubuntu one) - ShyGuy91284, on 11/21/2008, -0/+2This is one way of doing it. Right now though I rsync my laptop (main workstation) to a gzip-compressed partition on my ZFS server and take snapshots at intervals so I have a fair number of backups. My next step is to get encrypted backups working on a remote host (maybe overly paranoid, but I'd rather my files not be stored in a readily-readable format on a server that is probably easily accessible to at least a few hundred employees at the hosting company).
- nadadingsda, on 11/21/2008, -0/+2The best solution I have found for backups is using rsync with the "--link-dest" option. It allows you to keep multiple backups but doesn't waste space since it uses hard links for files that haven't changed. In the end this is similar to Apple's time machine.
We use this where I work to backup a 600GB partition to an 1TB drive that is connected to another server. As the files are not changing very often, 1TB is enough to keep daily backups up to 7 days back. The cool thing is that you can mount the backup partition read-only over NFS, so users can just restore files themselves if they accidentally delete something.
More details here: http://www.mikerubel.org/computers/rsync_snapshots ... - kylepike, on 11/21/2008, -0/+2No ones heard of BackupPC? http://backuppc.sourceforge.net/. Point and click restore to network PC's. and Its great if you have to backup more then one computer. Especially windows, it uses pooling and compression. so your backups are much smaller then a .tar would ever be. ... Really great for those times "I can't find the file I saved last night..."
- smotpoker, on 11/21/2008, -0/+2Yeah, you did provide a link and no, I didn't read it. It just doesn't make sense to me to start a new comment-thread on the same topic to say essentially the same thing. Just as I appended to the previous comment regarding rsync, it probably would have been apt for you to do the same.
I wasn't trying to say your comment or link were entirely useless, sorry if my knit-picking indicated otherwise. - Metasquares, on 11/21/2008, -0/+2Instead of manually excluding mounted partitions, there's also an option to restrict tar to one file system.
- FreddieD, on 11/21/2008, -0/+2rdiff-backup is awesome. It uses the common rsync protocol so i'm not locked into anything, it's powerful enough to handle incrementals automatically, and it's simple enough to where I don't have to spend hours learning it and setting it up like I would a larger backup system (bacula, amanda). If you don't require an enterprise level solution, it's been the best i've tried.
And in the latest version, they built a statically linked windows version, so you can back up stuff like your My Documents folder straight to your linux machine. - Twinnie, on 11/21/2008, -1/+3Linux news is always so sexy, I can't understand why none of these guys have girlfriends.
- 3Den, on 11/21/2008, -0/+2This gets interesting when combined with SSH... you can pipe the tar datastream directly to another machine and un-tar it at the same time.
This is useful in one scenario I have found where nothing else seems to be up to the task - copying over a million files from a single folder to another machine.
Regular tools like CP and rsync can't do it.
Something like tar - czf |ssh user@remote.com "tar - zxf" - HonoredMule, on 11/21/2008, -0/+2@mikelieman: More space = more backups, and less redundancy = way more backups.
More space AND less redundancy = way WAY more backups. Why not have both?
Also, some of us are backing up small or even large networks. "Just buy more hard drives" /really/ doesn't scale. - d9d9, on 11/21/2008, -0/+2Please read carefully. Mount SNAPSHOT. Snapshot allows you to take image of partition without unmounting it. And device-mapper volumes (lvm or md) can be located in /dev as well. Like /dev/storage/root where storage is a volume group.
- HonoredMule, on 11/22/2008, -0/+1@mikelieman: Are you trying to prove my point? That's terrible!
At any rate, I don't happen to have that kind of loose change in my pocket right now, so I'm going to go with the not insanely expensive option for my home network. Why the hell would I spend that kind of cash on tape anyway, when I could build a RAID-Z2 backup server with equal capacity, double redundancy, and radically higher convenience, speed, versatility, and manageability, for half that much, or 3/4ths that much using server-grade components?
You are right about one thing...what really counts is that the data is really there when you really need it. This begs the question why you would want to use a system that is more expensive, requires manual intervention to maintain operation, and is basically ***** than an actually intelligent approach in every way conceivable.
And regardless of the network size, you are basically advocating throwing expensive hardware at a non-problem. Systems like rsync are free, effective, efficient, greener, convenient, secure, reliable, more performant (drastically minimized throughput as well as capacity required) and basically leave no advantage to the "buy more storage" solution. With a combination of some proprietary backup software and ZFS snapshots, I have for each of 6 machines: a month's worth of daily user data incremental backup images, a year's worth of biweekly full system backups, and all media of current interest (photo albums, music and video libraries, downloaded materials, etc.) kept with a similar array of daily and hourly snapshots--and it all fits in 1/2TB per unique copy. The storage/backup server has double redundancy built in, and I only ever touch the system to plug in the USB drive that carries an offline backup. I have restored files and complete systems from these backups several times without ever having the slightest issue with data integrity restoring files or even full systems to bare metal, and usually have the backup granularity needed to keep any loss of productivity to an absolute minimum. The whole system costs about 1 grand, and stores more UNIQUE data in 1TB than any "dumbfire" solution could fit in 50TB.
What are you, anyway, Tim Taylor on a power trip--or are you just totally careless with your cash, the worlds natural resources, and anything else you can waste? You're making my head hurt...if I were your boss you'd be fired by now. - tnoy, on 11/21/2008, -1/+2You don't need to mount a drive if you're using /dev/device, in fact, it would be a good ideal to unmount it first.
- Giga, on 11/22/2008, -0/+1"Also, make sure that if you use this that the computer you restore it to is the same, or at the very least, exact same hardware, else it will crash the machine when you restore."
Bollocks. This really only applies to Windows and custom kernels with missing drivers. X may have issues if xorg.conf specifies a driver for a different brand, but the system itself shouldn't crash. - mikelieman, on 11/22/2008, -1/+2@HonoredMule,
A 1.6TB Rack mount LTO-4 Tape Drive is about 4 grand.
Pick your choice of software to label them, rotate them, and fill them as you choose. Any Enterprisey software will do the job. The only thing that really counts is that the data is really there when you really need it. - Giga, on 11/22/2008, -0/+1So all I have to do to backup my Windows, Mac OS or non-ubuntu GNU/Linux distribution etc is to switch to Ubuntu? Thanks for the invaluable wisdom!
- d9d9, on 11/21/2008, -0/+1Complete backup means backup everything. But why then not just backup partition ?
1. mount LVM snapshot
2. dd if=/dev/snapshot | gzip > /path/to/backup/snapshot.img.gz
3. unmount snapshot -
Show 51 - 64 of 64 discussions




What is Digg?