The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Backup woes (http://hintsforums.macworld.com/showthread.php?t=31458)

Michael Aars 12-01-2004 08:43 PM

Backup woes
 
Okay here's the setup.

I have three external firewire hard drives. Two are mirrored. One is to backup the mirror. I work off the mirror on a daily basis.

What I would like, and have yet to find, is some good software that will keep a schedule, say 7:30 every evening, and backup the mirror to the third drive. So that today's work is backed up at the end of today.

I'd also like about three copies on the backup so that in case something goes wrong or I've deleted/saved over the wrong files today, I can go back two days and get earlier versions of the files.

So far I've yet to have success. LaCie Silverkeeper was what I was using for a while, but it doesn't always backup as scheduled. I can't figure out why some days it does and some days it doesn't.

Is there some sort of Apple Script I could use to take folder A from Mirror Drive to Backup Drive that executes in a timely, predictable manner? So that Backup Drive has folder A (today's work), folder A_1 (yesterday's work), folder A_2 (work from two days ago).

Any help or suggestions would be greatly appreciated.

rotero 12-01-2004 08:54 PM

Check out ChronoSync.

carouzal 12-01-2004 09:09 PM

Rsyncx, with a shell script or an applescript wrapper is what I use, and schedule to run via cron (crontab)... once the script is written it is flawless... I have yet to have a backup fail, rotation is simple as well.

Rsyncx, you could also install the Developer tools and use CpMac both handle resources forks while standard unix cp and rsync do not.

Also from what you describe a 100% applescript solution would work as well but scheduling would still be done the unix way with cron.

davewalcott 12-02-2004 02:15 AM

Retrospect would work great for this. Of if you're looking for a freebie, try PSyncX.

AYee 12-02-2004 10:43 AM

Retrospect is a good choice - we use the Retrospect Server and your backup requirements would be a simple task.

I have no experience with Retrospect Desktop - you can get a 30 day trial version.

Retrospect has many features, and some of those features may cause you "problems" becuase error reporting is not the gratest. You will sometimes have to infer from the symthoms the root cause of the problem to get to the solution.

Michael Aars 12-02-2004 12:09 PM

to carouzal:
 
I'm afraid you spoke over my head there. I have no idea even where to begin to deal with what you suggested.

Sorry. But thanks for the feedback.

carouzal 12-02-2004 12:16 PM

Sorry about that, it's actually not that hard and very free unlike most other backup solutions.

If you would like more info let me know and Ill see what I can do to help you out.

Michael Aars 12-02-2004 12:42 PM

Chronosync and Labels?
 
I have my doubts about Chronosync. I've been test driving it for about an hour.

Here's a really simple test. Create a folder. Name it 'Green Folder'. Label it green.

Sync your Green folder from one drive to another drive. Works great.

Now go to your original, leave the name 'Green Folder' but label it blue.

Sync again.

Your backup copy is named Green Folder and has a green label. The labeling doesn't transfer.

Any suggestions?

Michael Aars 12-02-2004 12:44 PM

to carouzal
 
I would love help Carouzal. Thanks for the offer. What's the first step?

carouzal 12-02-2004 12:55 PM

1st step, do you have the Developer tools? if not grab this and install it:

http://www.versiontracker.com/dyn/moreinfo/macosx/16814

Next, You have 2 Drives mirrored (Only shows 1 drive in the finder?) that you want all the data on backed up to a third drive right? Or are there only certain folders you want backed up on the mirrored drive?

carouzal 12-02-2004 01:00 PM

BTW, I just tried you folder label test with rsyncx and it only changes the label color on the backed up file if the folder or file has changed, just adding files to a labeled folder will not do it. So changing the label does not change the modification time of the file. if you follow, meaning the backup software thinks nothing has changed.

Michael Aars 12-02-2004 01:10 PM

Okay, step 1: Download and install RsyncX. Check.

Step 2: The setup: Two mirrored external Firewire drives appearing as one in the Finder. Cleverly I named this 'Mirrored HD'

One external Firewire drive, equally cleverly named 'Backup'.

The Mirrored HD has three folders. I would like only the first folder to copy to Backup.

carouzal 12-02-2004 01:14 PM

What is the name of that folder?

Michael Aars 12-02-2004 01:18 PM

The folder's named 'Business'

carouzal 12-02-2004 01:34 PM

I am working on this now, I should have the script posted soon. Just doing some quick testing before I post it.

carouzal 12-02-2004 02:59 PM

Here is the script:

Very simple to start we can work from this.

Code:

#!/bin/bash

# - ############################################################################
# - Run Some Tests
# - ############################################################################

test -f /usr/local/bin/rsync
if [ $? = 1 ] ; then
        echo Please Verify rsync is located in /usr/local/bin
        exit 0
fi

# - ############################################################################
# - Rotate Backups
# - ############################################################################

if [ -d /Volumes/Backup/Business\ 3 ] ; then
rm -dR /Volumes/Backup/Business\ 3
fi

if [ -d /Volumes/Backup/Business\ 2 ] ; then
mv /Volumes/Backup/Business\ 2 /Volumes/Backup/Business\ 3
fi

if [ -d /Volumes/Backup/Business ] ; then
mv /Volumes/Backup/Business /Volumes/Backup/Business\ 2
fi

# - ############################################################################
# - Make Backup
# - ############################################################################

/usr/local/bin/rsync -a /Volumes/Mirrored\ HD/Business /Volumes/Backup --eahfs --progress


carouzal 12-02-2004 03:09 PM

Next Step:

copy the code from my last post,

Open Terminal.app,

type pico ~/backup.sh then command-v to past the code,

now type ctrl-O to save and ctrl-X to quit pico,

now type chmod 755 backup.sh , this makes the script executable,

now type ./backup.sh and the script should run check that the files are copied to the Backup drive

repeat several times to see the roatation at work...


Once we verify that this works we can get it scheduled to run everyday.

Jim

Michael Aars 12-02-2004 04:07 PM

After I type ./backup.sh and press enter, I get:

./backup.sh: line 29: [: too many arguments

After I do it again, starting at the chmod line, I get:

./backup.sh: line 29: [: too many arguments
./backup.sh: line 40: --eahfs: command not found

But it does look like it copies a "Business" folder with all the subfolders onto the Backup drive once.

No label colors transfer. As I think you mentioned.

carouzal 12-02-2004 04:18 PM

it's not finding the rsyncx version of rsync... that's the --eahfs and why it did not copy the labels...

in the terminal type /usr/local/bin/rsync it should display a usage message, towards the bottom you should see a --eahfs let me know if you do

carouzal 12-02-2004 04:20 PM

btw, you only need to run the chmod command once, after that the file should remain executable... so only the ./backup.sh is needed.

Michael Aars 12-02-2004 05:19 PM

You're gonna love this, here's what it comes up with:

rsync version 2.6.0 protocol version 27
Copyright (C) 1996-2004 by Andrew Tridgell and others
HFS+ filesystem support for OSX (C)2004 Kevin A. Boyd
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles,
IPv6, 32-bit system inums, 64-bit internal inums

rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.

rsync is a file transfer program capable of efficient remote update
via a fast differencing algorithm.

Usage: rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST
or rsync [OPTION]... [USER@]HOST:SRC DEST
or rsync [OPTION]... SRC [SRC]... DEST
or rsync [OPTION]... [USER@]HOST::SRC [DEST]
or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]
or rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
SRC on single-colon remote HOST will be expanded by remote shell
SRC on server remote HOST may contain shell wildcards or multiple
sources separated by space as long as they have same top-level

Options
-v, --verbose increase verbosity
-q, --quiet decrease verbosity
-c, --checksum always checksum
-a, --archive archive mode, equivalent to -rlptgoD
-r, --recursive recurse into directories
-R, --relative use relative path names
--no-relative turn off --relative
--no-implied-dirs don't send implied dirs with -R
-b, --backup make backups (see --suffix & --backup-dir)
--backup-dir make backups into this directory
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
-u, --update update only (don't overwrite newer files)
-l, --links copy symlinks as symlinks
-L, --copy-links copy the referent of symlinks
--copy-unsafe-links copy links outside the source tree
--safe-links ignore links outside the destination tree
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-t, --times preserve times
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
--no-whole-file turn off --whole-file
-x, --one-file-system don't cross filesystem boundaries
-B, --block-size=SIZE checksum blocking size (default 700)
-e, --rsh=COMMAND specify the remote shell
--rsync-path=PATH specify path to rsync on the remote machine
--existing only update files that already exist
--ignore-existing ignore files that already exist on receiving side
--delete delete files that don't exist on the sending side
--delete-excluded also delete excluded files on the receiving side
--delete-after delete after transferring, not before
--ignore-errors delete even if there are IO errors
--max-delete=NUM don't delete more than NUM files
--partial keep partially transferred files
--force force deletion of directories even if not empty
--numeric-ids don't map uid/gid values by user/group name
--timeout=TIME set IO timeout in seconds
-I, --ignore-times turn off mod time & file size quick check
--size-only ignore mod time for quick check (use size)
--modify-window=NUM compare mod times with reduced accuracy
-T --temp-dir=DIR create temporary files in directory DIR
--compare-dest=DIR also compare destination files relative to DIR
--link-dest=DIR create hardlinks to DIR for unchanged files
-P equivalent to --partial --progress
-z, --compress compress file data
-C, --cvs-exclude auto ignore files in the same way CVS does
--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE exclude patterns listed in FILE
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE don't exclude patterns listed in FILE
--files-from=FILE read FILE for list of source-file names
-0 --from0 all *-from file lists are delimited by nulls
--version print version number
--daemon run as a rsync daemon
--no-detach do not detach from the parent
--address=ADDRESS bind to the specified address
--config=FILE specify alternate rsyncd.conf file
--port=PORT specify alternate rsyncd port number
--blocking-io use blocking IO for the remote shell
--no-blocking-io turn off --blocking-io
--stats give some file transfer stats
--progress show progress during transfer
--log-format=FORMAT log file transfers using specified format
--password-file=FILE get password from FILE
--bwlimit=KBPS limit I/O bandwidth, KBytes per second
--write-batch=PREFIX write batch fileset starting with PREFIX
--read-batch=PREFIX read batch fileset starting with PREFIX
--showtogo display how many files left to rsync until done
--eahfs rsync with extended HFS+ attributes
-h, --help show this help screen
-4 prefer IPv4
-6 prefer IPv6


Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation
See http://rsync.samba.org/ for updates, bug reports, and answers
rsync error: syntax or usage error (code 1) at main.c(1012)

carouzal 12-02-2004 07:17 PM

Thats good,

there must be a problem when the script was pasted.

run this:

cat ~/backup.sh > Desktop/backup.txt

Goto you desktop open the txt file and past the contents here.


All times are GMT -5. The time now is 10:50 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.