Berkeley CSUA MOTD:Entry 31146
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2004/7/2-5 [Computer/SW/Unix, Computer/HW/Drives] UID:31146 Activity:high
7/2     What software do you use to backup your own PC?
        \_ snapshot backups via rsync over ssh
           http://www.mikerubel.org/computers/rsync_snapshots
           \- have you compared this with rdiff backups from
              stanfraud?
        \_ Raid 1+0.  No backups.
           \_ you never accidentally delete a file?
              \_ all important files in rcs.  this is deja-vu.  I answered
                 this at length two days ago.
        \_ rsync with incremental options running from cron to backup my
           Linux files to a second disk. On the windows box, I use
           right now the windows backup tool manually to backup everything
           to a second disk but you could schedule it automatically.
           \_ You can also put your windows data on a linux box and
              make it accessible to windows via a samba share.
        \_ Make CD backups every 6 months or so.
        \_ XP box:  Maxtor OneTouch drive, and store everything important
           on Samba shares.  FreeBSD boxes:  rsync back and forth between
           boxes.  -John
        \_ I have multiple matched drives. Every three months or so, I copy
           everything from one drive to another and then start using the new
           copy. The next time, I swap the drives. Once a month I burn stuff
           to a cd/dvd. Important stuff I keep in cvs. I backup my repository
           every other week. I'm mostly using MacOS X, FreeBSD and OpenBSD,
           I don't bother backing up my WinXP box, nothing important on it
           except DVDDecrypter :-)
           \_ I've read that if you let drives spin down for too long there
              is a good chance they won't spin up again, thus cold disk is
              not a good backup medium.  I've done a little of what you're
              doing but not enough to say if what I read is true or not. YMMV.
                \_ From what I've seen this is only the case if you let
                   your drives sit for years not months. Even then, most
                   drives will work (I just powered on a scsi drive that I
                   last used in 1997 and got some data from it last week).
                   Also, I tried to make sure that my drives are never
                   more than 24 months old. Around 18 months or so I upgrade
                   to a larger pair and sell the older pair to offset the
                   cost.
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/8/30-11/7 [Computer/SW/Apps, Computer/SW/Unix] UID:54470 Activity:nil
8/30    Is wall just dead? The wallall command dies for me, muttering
        something about /var/wall/ttys not existing.
        \_ its seen a great drop in usage, though it seems mostly functional.
            -ERic
        \_ Couldn't open wall log!: Bad file descriptor
           Could not open wall subscription directory /var/wall/ttys: No such file or directory
	...
2012/9/20-11/7 [Computer/SW/Unix, Finance/Investment] UID:54482 Activity:nil
9/20    How do I change my shell? chsh says "Cannot change ID to root."
        \_ /usr/bin/chsh does not have the SUID permission set. Without
           being set, it does not successfully change a user's shell.
           Typical newbie sys admin (on soda)
           \_ Actually, it does: -rwsr-xr-x 1 root root 37552 Feb 15  2011 /usr/bin/chsh
	...
2012/3/29-6/4 [Computer/HW/Memory, Computer/HW/CPU, Computer/HW/Drives] UID:54351 Activity:nil
3/29    A friend wants a PC (no mac). She doesn't want Dell. Is there a
        good place that can custom build for you (SSD, large RAM, cheap video
        card--no game)?
        \_ As a side note: back in my Cal days more than two decades ago when
           having a 387SX made me the only person with floating-point hardware,
           most machines were custom built.
	...
2012/5/8-6/4 [Computer/SW/Unix] UID:54383 Activity:nil
5/8     Hello everyone!  This is Josh Hawn, CSUA Tech VP for Spring 2012.
        About 2 weeks ago, someone brought to my attention that our script
        to periodically merge /etc/motd.public into /etc/motd wasn't
        running.  When I looked into it, the cron daemon was running, but
        there hadn't been any root activity in the log since April 7th.  I
        looked into it for a while, but got lost in other things I was
	...
2007/11/12-16 [Computer/SW/OS/Linux, Computer/SW/Unix] UID:48623 Activity:nil
11/12   how do i make a fail safe magical backup for my debian box
        that i can quickly boot from if the box explodes?
        \_ keep a linux live boot cd around for just such an emergency
           \_ And learn about 'dd'
        \_ I was hoping there was something as slick as CCC, for unix.
           \_ You can first duplicate the disk offline with dd, then just
	...
2005/12/30-2006/1/4 [Computer/SW/OS/Windows] UID:41180 Activity:nil 65%like:41172
12/29   A friend's primary Windows 2000 hard disk got nuked, and her
        backup drive is missing data. I'm looking for any
        recommendations for data recovery software for FAT/NTFS
        (restoring deleted files or corrupted filesystems) or
        recommendations for data recovery services in SF?
        \_ Get an external USB drive enclosure.  You want something
	...
2005/12/27-30 [Computer/HW/Drives, Computer/SW/OS/Windows] UID:41151 Activity:nil
12/27   I'm trying to help out with my mother in law's computer problems. She
        has two Windows XP computers (one desktop, one tablet pc) that she was
        using for her job before she retired. The computers themselves are old
        and her workplace doesn't want them back but they are installed with
        all this corporate Novell stuff that I don't know anything about and
        her account on the computer has very restricted permissions (she can't
	...
2005/6/22-23 [Computer/SW/OS/OsX] UID:38251 Activity:high
6/22    When I burn an iso image using the "Disk Utility" in OS X (Tiger)
        and I then use readcd on a linux box to verify the md5sum of the
        burned cd, the md5sum of the CD doesn't match the md5sum of the
        origional iso file. Is OS X modifying the iso image before it
        burns it or something? Seems strange.
        \_ Does this match on any of your other burned-CDs vs. ISO files?
	...
2005/5/18-19 [Computer/SW/Apps/Media, Computer/HW/Drives] UID:37730 Activity:nil
5/17    My second data backup question. I am looking for a backup media I can
        take off-site. I'll repeat that we've found the failure rate backing up
        to CD unacceptable. She wants to go with an Iomega product but I was
        wondering if people have had good/bad experience with these,
        reliability-wise and if they have better suggestions. I have about
        $400 for this.
	...
2005/4/1-3 [Computer/HW/Laptop, Computer/HW/Drives] UID:37032 Activity:low
4/1     I'd like to play my favorite EA game on the laptop. However, I
        don't have a CD player for my laptop and I'm wondering if it
        is possible to mount the CD on my desktop and access it via
        wireless. I know that EA has really weird CD protection
        schemes, that's why I'm wondering if anyone has successfully
        done this. -ok thx
	...
2005/3/19-20 [Computer/HW/Drives, Computer/HW/CPU] UID:36772 Activity:high
3/19    Given the choice between a firewire and USB2.0 connection
        (between an external hard drive and my computer), which one is
        better and why? Thanks.
        \_ Firewire is faster and more robust for that application.  USB
           is more widely available if you'd ever want to move the disk to
           another machine.  -tom
	...
2005/2/23-24 [Computer/SW/Security] UID:36377 Activity:very high
2/23    Hi, my girlfriend's mom is in Taiwan.  Her computer stopped booting;
        it shows BIOS, but it won't show the WinXP screen.  So, it sounds like
        a virus (less likely, partial drive failure / OS corruption, but let's
        assume it's a virus).
        She is concerned about recovering her files.
        Normally if I were on-site I'd just pull out the drive, put it in an
	...
2005/2/3-5 [Computer/HW/Memory, Computer/HW/Drives] UID:36055 Activity:moderate
2/3     So, I'm really confused about this notion of computer science
        metrics where everything's kind of 2^n, but sometimes not. For
        example, if I have a 4 GIG hard drive, does that mean I have
        exactly 2^32 bytes of space? Does that translate to 4000000000
        bytes, or some number that's close to it? How about megahertz?
        Say I have a 2.5GHz computer, does it run at exactly 2500000
	...
2005/1/18-19 [Finance/Banking, Computer/HW/Drives] UID:35762 Activity:moderate
1/18    A bunch of CD-ROMS I have are corrupted. They're in a nice
        CaseLogic case, closed, stored in a temperate (70-85F), dry
        location. I have no idea why they're corrupted, but I know
        one thing-- they've been sitting close my Sharper Image Ionizer
        [plus UV mode turned on], for maybe 6 months. I'm suspecting
        that either the ions or the UV killed them, but is it actually
	...
2005/1/12 [Computer/HW/Drives] UID:35672 Activity:very high
1/11    Using SATA (serial ATA) as the one and only primary HD, any
        problem with boot up? How about with motherboards built in say,
        2002? Any problem with that? Pros/cons with SATA? Comments?
        \_ You expecting to install Windoze on SATA and have it boot?
        \_ I had to get a special driver floppy to install Win XP on a recent
           box w/ onboard SATA.  It wasn't too hard, though.  YMMV.  --dbushong
	...
2004/11/12 [Computer/HW/Drives, Computer/SW/OS/Linux, Computer/SW/OS/Windows] UID:34853 Activity:moderate
11/12   Dual boot question:  I had a hard drive set up with dual boot.
        XP and Linux.  I had problems with the Windows partition.
        I got a new hard drive.  I connected the new hard drive and set it
        as the slave drive.  I went into setup and set it to boot from the
        slave drive (the new one).  I then reinstalled XP on the new drive.
        Oops.  My boot loader on the original drive got overwritten.  The
	...
Cache (8192 bytes)
www.mikerubel.org/computers/rsync_snapshots -> www.mikerubel.org/computers/rsync_snapshots/
Frequently Asked Questions Abstract This document describes a method for generating automatic rotating "snapshot"-style backups on a Unix-based system, with specific examples drawn from the author's GNU/Linux experience. Snapshot backups are a feature of some high-end industrial file servers; they create the illusion of multiple, full backups per day without the space or processing overhead. All of the snapshots are read-only, and are accessible directly by users as special system directories. It is often possible to store several hours, days, and even weeks' worth of snapshots with slightly more than 2x storage. rsync program, which is installed by default on most Linux distributions. Properly configured, the method can also protect against hard disk failure, root compromises, or even back up a network of heterogeneous desktops automatically. Ever accidentally delete or overwrite a file you were working on? Wouldn't it be nice if there were a /snapshot directory that you could go back to, which had complete images of the file system at semi-hourly intervals all day, then daily snapshots back a few days, and maybe a weekly snapshot too? What if every user could just go into that magical directory and copy deleted or overwritten files back into "reality", from the snapshot of choice, without any help from you? And what if that /snapshot directory were read-only, like a CD-ROM, so that nothing could touch it (except maybe root, but even then not directly)? Best of all, what if you could make all of that happen automatically, using only one extra, slightly-larger, hard disk? In my lab, we have a proprietary NetApp file server which provides that sort of functionality to the end-users. It provides a lot of other things too, but it cost as much as a luxury SUV. It's quite appropriate for our heavy-use research lab, but it would be overkill for a home or small-office environment. But that doesn't mean small-time users have to do without! I'll show you how I configured automatic, rotating snapshots on my $80 used Linux desktop machine (which is also a file, web, and mail server) using only a couple of one-page scripts and a few standard Linux utilities that you probably already have. I'll also propose a related strategy which employs one (or two, for the wisely paranoid) extra low-end machines for a complete, responsible, automated backup strategy that eliminates tapes and manual labor and makes restoring files as easy as "cp". Using rsync to make a backup The rsync utility is a very well-known piece of GPL'd software, written originally by Andrew Tridgell and Paul Mackerras. If you have a common Linux or UNIX variant, then you probably already have it installed; Rsync's specialty is efficiently synchronizing file trees across a network, but it works fine on a single machine too. Basics Suppose you have a directory called source, and you want to back it up into the directory destination. To accomplish that, you'd use: rsync -a source/ destination/ (Note: I usually also add the -v (verbose) flag too so that rsync tells me what it's doing). destination/ except that it's much more efficient if there are only a few differences. Sometimes This isn't really an article about rsync, but I would like to take a momentary detour to clarify one potentially confusing detail about its use. You may be accustomed to commands that don't care about trailing slashes. For example, if a and b are two directories, then cp -a a b is equivalent to cp -a a/ b/. However, rsync does care about the trailing slash, but only on the source argument. For example, let a and b be two directories, with the file foo initially inside directory a Then this command: rsync -a a b produces b/a/foo, whereas this command: rsync -a a/ b produces b/foo. The presence or absence of a trailing slash on the destination argument (b, in this case) has no effect. Using the --delete flag If a file was originally in both source/ and destination/ (from an earlier rsync, for example), and you delete it from source/, you probably want it to be deleted from destination/ on the next rsync. However, the default behavior is to leave the copy at destination/ in place. Assuming you want rsync to delete any file from destination/ that is not in source/, you'll need to use the --delete flag: rsync -a --delete source/ destination/ Be lazy: use cron One of the toughest obstacles to a good backup strategy is human nature; if there's any work involved, there's a good chance backups won't happen. Fortunately, there's a way to harness human laziness: make cron do the work. To run the rsync-with-backup command from the previous section every morning at 4:20 AM, for example, edit the root cron table: (as root) crontab -e Then add the following line: 20 4 * * * rsync -a --delete source/ destination/ Finally, save the file and exit. The backup will happen every morning at precisely 4:20 AM, and root will receive the output by email. you should use full path names (such as /usr/bin/rsync and /home/source/) to remove any ambiguity. Incremental backups with rsync Since making a full copy of a large filesystem can be a time-consuming and expensive process, it is common to make full backups only once a week or once a month, and store only changes on the other days. These are called "incremental" backups, and are supported by the venerable old dump and tar utilities, along with many others. However, you don't have to use tape as your backup medium; it is both possible and vastly more efficient to perform incremental backups with rsync. The most common way to do this is by using the rsync -b --backup-dir= combination. here, but I won't discuss it further, because there is a better way. If you're not familiar with hard links, though, you should first start with the following review. Review of hard links We usually think of a file's name as being the file itself, but really the name is a hard link. A given file can have more than one hard link to itself--for example, a directory has at least two hard links: the directory name and . It also has one hard link from each of its sub-directories (the .. If you have the stat utility installed on your machine, you can find out how many hard links a file has (along with a bunch of other information) with the command: stat filename Hard links aren't just for directories--you can create more than one link to a regular file too. For example, if you have the file a, you can make a link called b: ln a b Now, a and b are two names for the same file, as you can verify by seeing that they reside at the same inode (the inode number will be different on your machine): ls -i a 232177 a ls -i b 232177 b So ln a b is roughly equivalent to cp a b, but there are several important differences: 1 The contents of the file are only stored once, so you don't use twice the space. You do this by running cp with the --remove-destination flag. it doesn't really remove a file, it just removes that one link to it. A file's contents aren't truly removed until the number of links to it reaches zero. In a moment, we're going to make use of that fact, but first, here's a word about cp. Using cp -al In the previous section, it was mentioned that hard-linking a file is similar to copying it. It should come as no surprise, then, that the standard GNU coreutils cp command comes with a -l flag that causes it to create (hard) links instead of copies (it doesn't hard-link directories, though, which is good; Another handy switch for the cp command is -a (archive), which causes it to recurse through directories and preserve file owners, timestamps, and access permissions. Together, the combination cp -al makes what appears to be a full copy of a directory tree, but is really just an illusion that takes almost no space. To the end-user, the only differences are that the illusion-copy takes almost no disk space and almost no time to generate. Putting it all together We can combine rsync and cp -al to create what appear to be multiple full backups of a filesystem without taking multiple disks' worth of space. In reality, the extra storage will be equal to the current size of source_directory/ plus the total size of the cha...