Home » Questions » Computers [ Ask a new question ]

Best way to backup important files onto a usb drive? [duplicate]

Best way to backup important files onto a usb drive? [duplicate]

Hi

Asked by: Guest | Views: 225
Total answers/comments: 5
Guest [Entry]

"A batch itself is not much use, you'd need to use the copy or xcopy command to actually do the backup/sync.

However there are known problems with copy and xcopy (failing on long file paths, locked files etc) so instead I would advise using Robocopy which is part of the Windows 2003 resource kit tools download.

Then you call it from a batch file. As an example to do a standard backup I use:

robocopy ""C:\Documents and Settings"" ""Y:\Backups\EEEPC900HA\Documents and Settings"" /s /e /zb /copyall /log:%logfile% /tee /ndl /r:0

This command copies all files and folders that are new or have changed from ""C:\Documents and Settings"" to my external backup drive. Locked files will be skipped and it will not re-try to speed things up. Long paths/filenames are handled correctly.

Robocopy can do both a standard backup (one way) or a ""Sync"" where both folders are kept identical. You can also exclude from the backup certain files and folders using wildcards.

The only thing Robocopy doesn't really give you is shadow copying of locked files (it just skips locked files). But only a few tools do, and it requires the shadow copy service to be running.

My backup process is simply a shortcut on the desktop calling the Robocopy batch file. I just plug in my drive and double-click the shortcut. Backing up 40 GB of files takes a while the first time, but subsequently only new/changed files are copied so it only takes on average about 30 seconds."
Guest [Entry]

I would do it with a batch file.
Guest [Entry]

"I use rsync to back up photos on Linux. The external device has several partitions so I need to find the right one first.

#!/bin/sh

target=$(ls -d /media/disk*/photos)
rsync -a --progress -r $HOME/photos/ $target/"
Guest [Entry]

"If you want very robust backup command-line tools:

rdiff-backup

What is it?
rdiff-backup backs up one directory to
another, possibly over a network. The
target directory ends up a copy of the
source directory, but extra reverse
diffs are stored in a special
subdirectory of that target directory,
so you can still recover files lost
some time ago. The idea is to combine
the best features of a mirror and an
incremental backup. rdiff-backup also
preserves subdirectories, hard links,
dev files, permissions, uid/gid
ownership, modification times,
extended attributes, acls, and
resource forks. Also, rdiff-backup can
operate in a bandwidth efficient
manner over a pipe, like rsync. Thus
you can use rdiff-backup and ssh to
securely back a hard drive up to a
remote location, and only the
differences will be transmitted.
Finally, rdiff-backup is easy to use
and settings have sensical defaults.

You can also get a windows version of the infamous rsync for windows, which one should be able to use locally IINM:

DeltaCopy

There is also Unison:

Unison

but I think rdiff-backup is a more robust and flexible technology, and not a network-centric as unison (I never used unison so can't comment)."
Guest [Entry]

This tutorial, titled "Setting up Unison for your mom", addresses this exact issue.