The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Most efficient way to back up a directory to an external drive?

contrabandcontraband Registered User regular
edited October 2007 in Help / Advice Forum
So I bought an external drive that's bigger than my internal drive. What's the most efficient way to back up my entire home or C:\ drive to the external? Preferably drag-and-drop, and I'd like it to avoid transferring files that have already been written to the external drive, so I can avoid an hour-long read/write session every time I go to back up. Suggestions? I'm dealing with XP and OS X.

sigxw0.jpg
contraband on

Posts

  • yotesyotes Registered User regular
    edited October 2007
    Take a look at Unison. It's pretty neat.

    yotes on
    [SIGPIC][/SIGPIC]
  • JHunzJHunz Registered User regular
    edited October 2007
    I've also heard good things about Robocopy

    JHunz on
    bunny.gif Gamertag: JHunz. R.I.P. Mygamercard.net bunny.gif
  • wunderbarwunderbar What Have I Done? Registered User regular
    edited October 2007
    you can write a simple batch file then schedule it to run every night at say, 2am.

    the batch file would look like this(substitute e:/ for whatever drive letter your external is):

    @ echo off
    xcopy "c:/" "e:/" /a


    That's it, 2 lines

    save it as backup.bat to the root of your external drive, then set up a scheduled task to run in windows that executes that file, either daily, weekly, whatever.

    Boom, you now have incrimental backups for the total cost of 5 minutes of your time.

    EDIT: this will work in the windows world for sure, not OS X

    Hell, if you don't want to schedule the backup, you can run it yourself at your convienence by just running the batch file by double clicking it.

    after the initial copy, it will only copy files that have been modified since the last time you copied.

    wunderbar on
    XBL: thewunderbar PSN: thewunderbar NNID: thewunderbar Steam: wunderbar87 Twitter: wunderbar
  • contrabandcontraband Registered User regular
    edited October 2007
    Is there a command similar to xcopy in OS X? I'm using OS X most of the time.

    contraband on
    sigxw0.jpg
  • Legoman05Legoman05 Registered User regular
    edited October 2007
    You should be able to run dd, and then pipe it through gzip...

    dd if=/dev/hdb | gzip >/mnt/hda3/system_drive_backup.img.gz

    (see http://en.wikipedia.org/wiki/Dd_(Unix) )

    Since OS X is Unix-based, this should work fine. You can either set up cron through macports, or find the scheduled tasks thing in OS X.

    Legoman05 on
  • PirateJonPirateJon Registered User regular
    edited October 2007
    XP has a backup utility. use that.

    PirateJon on
    all perfectionists are mediocre in their own eyes
  • AtomBombAtomBomb Registered User regular
    edited October 2007
    wunderbar wrote: »
    you can write a simple batch file then schedule it to run every night at say, 2am.

    the batch file would look like this(substitute e:/ for whatever drive letter your external is):

    @ echo off
    xcopy "c:/" "e:/" /a


    That's it, 2 lines

    save it as backup.bat to the root of your external drive, then set up a scheduled task to run in windows that executes that file, either daily, weekly, whatever.

    Boom, you now have incrimental backups for the total cost of 5 minutes of your time.

    EDIT: this will work in the windows world for sure, not OS X

    Hell, if you don't want to schedule the backup, you can run it yourself at your convienence by just running the batch file by double clicking it.

    after the initial copy, it will only copy files that have been modified since the last time you copied.

    I was playing around with this and it seems to copy everything each time even if the source files have not been changed or accessed since the last time it was run. Here's what I did:

    Set up batch file.
    Run it.
    Everything defined in the batch copied to the external. Awesome.
    Changed a test text file on the source.
    Ran batch file again.
    Prompt comes up asking if I want to overwrite the test file. I say yes.
    Prompt comes up asking me if I want to overwrite the next file, which has not changed.
    I ctrl-c out of the program.

    So I think I know how to suppress the prompt asking about overwrites to automatically say yes. However, I don't want the batch to re-copy stuff that it doesn't need to everytime that it is run. Anyone know if I can do that with just a batch file?

    If I left something out just let me know.

    edit- I'm guessing that Windows only checks the DAY, and not the time that the file was last archived/changed. If that's true, then it will continue to copy everything until I try this tomorrow. Is that accurate? This IT stuff has me feeling like an idiot.

    AtomBomb on
    I just got a 3DS XL. Add me! 2879-0925-7162
  • PirateJonPirateJon Registered User regular
    edited October 2007
    So I think I know how to suppress the prompt asking about overwrites to automatically say yes. However, I don't want the batch to re-copy stuff that it doesn't need to everytime that it is run. Anyone know if I can do that with just a batch file?

    Xcopy /?

    gets you

    /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.

    and

    /Y Suppresses prompting to confirm you want to overwrite an existing destination file.


    So what you really want is to remove the "-a", add a "-d" and "-y"

    This IT stuff has me feeling like an idiot.
    hah you'll NEVER know everything so get used to doing research. if you love solving problems this is the field for you.

    PirateJon on
    all perfectionists are mediocre in their own eyes
  • contrabandcontraband Registered User regular
    edited October 2007
    ... so no one's made a little freeware app that would do this for you in os x? D:

    contraband on
    sigxw0.jpg
  • Shazkar ShadowstormShazkar Shadowstorm Registered User regular
    edited October 2007
    Er, not sure about the external drive, but for like really important files.. there is free automatic online backup of 2GB from https://mozy.com/registration/free

    And I use that for my really important files and whatnot. And it's automatic.

    Shazkar Shadowstorm on
    poo
  • AtomBombAtomBomb Registered User regular
    edited October 2007
    Awesome, thanks guys. I particularly didn't know that you could use /d without specifying a date. Your help is really appreciated.

    AtomBomb on
    I just got a 3DS XL. Add me! 2879-0925-7162
  • WeretacoWeretaco Cubicle Gangster Registered User regular
    edited October 2007
    For windows you should also check out synctoy

    http://www.microsoft.com/windowsxp/using/digitalphotography/prophoto/synctoy.mspx
    Microsoft wrote:
    Now there is an easier way. SyncToy is a free PowerToy that provides an easy to use, highly customizable program that helps users to do the heavy lifting involved with the copying, moving, and synchronization of different directories. Most common operations can be performed with just a few clicks of the mouse, and additional customization is available without added complexity. SyncToy can manage multiple sets of folders at the same time; it can combine files from two folders in one case, and mimic renames and deletes in another. Unlike other applications, SyncToy actually keeps track of renames to files and will make sure those changes get carried over to the synchronized folder.

    It's free from the download site.

    Weretaco on
    Unofficial PA IRC chat: #paforums at irc.slashnet.org
  • embrikembrik Registered User regular
    edited October 2007
    contraband wrote: »
    ... so no one's made a little freeware app that would do this for you in os x? D:

    Leopard has one... but you'll have to buy Leopard. (Time Machine)

    In the meantime, a quick Google has netted this page with a list of some freeware backup solutions that seem to cover the most popular apps.

    embrik on
    "Damn you and your Daily Doubles, you brigand!"

    I don't believe it - I'm on my THIRD PS3, and my FIRST XBOX360. What the heck?
  • saggiosaggio Registered User regular
    edited October 2007
    OS X can use rsync, the best application of its type ever. It can also be used in Windows with cygwin. There are probably nice aqua front-ends, but you can just fire up your favourite *term, write yourself a script to backup the directories you want with the options you want, and then use a cronjob to make it all automated.

    saggio on
    3DS: 0232-9436-6893
  • EverywhereasignEverywhereasign Registered User regular
    edited October 2007
    In OSX mine is super simple using rsync. I made a backup script in the editor and then made iCal run it weekly. (You can mark the script as it's own "calender" and then set it to hidden so it doesn't clutter your real calender)

    Using rsync makes it copy only the changes in the directories and not everything each time. This saves on processing time. It will also delete the changes, so that the stupid txt file that you needed for a week deletes itself from your backup when you delete it from your "live" drive.

    The shell script is
    do shell script "rsync -aEv --delete --exclude=library/caches ~ /  Volumes/Backup"
    

    It works like a charm for me. Depending on how often you set it to backup. You need to realise that something you needed has been deleted before the next sync, or you'll lose it off the backup too.

    Everywhereasign on
    "What are you dense? Are you retarded or something? Who the hell do you think I am? I'm the goddamn Batman!"
  • Legoman05Legoman05 Registered User regular
    edited October 2007
    In OSX mine is super simple using rsync. I made a backup script in the editor and then made iCal run it weekly. (You can mark the script as it's own "calender" and then set it to hidden so it doesn't clutter your real calender)

    Real men use cron.

    Legoman05 on
  • EverywhereasignEverywhereasign Registered User regular
    edited October 2007
    Legoman05 wrote: »

    Real men use cron.

    Then, all genitalia aside, I am not a real man. :P

    I think I could figure out how to do it with cron, but iCal made it so easy. and pretty too. Never underestimate the power of pretty. :)

    Everywhereasign on
    "What are you dense? Are you retarded or something? Who the hell do you think I am? I'm the goddamn Batman!"
Sign In or Register to comment.