l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2009 Apr 09 21:35

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Utility to image a hard drive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Utility to image a hard drive

chris wrote:
> cp -r $1/* $2 

Careful, * can't usually match an infinite number of files.  While I'm not an
expert on which shells, operating systems, and c libraries have which limits,
it's safer to just say:
cp -r $1 $2
cp -r $1/ $2

I have a directory of files I really don't want to lose, so I want to keep
them on 3 machines so I do:

for i in hosta hostb hostc; do
	echo "syncing with host $i";
		if [ ! `hostname` == $i ]; then
			echo "sending files to $i\n";
			rsync $FLAGS . $i:$DIR/;
			echo "retrieving files from $i\n";	
			rsync $FLAGS $i:$DIR/ .;

That way whichever machine I sit at I can just run the sync script and get the
newest files irregardless of which of the 3 machines I edited those files on last.

But if you don't want to write your own scripts I'd check out rdiff-backup,
it's pretty slick for storing things like a snapshot of your directory daily
for the last 2 weeks, while not costing much more disk than a single copy of
your directory.
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!