From: Maurice Batey on
On Fri, 19 Dec 2008 04:17:54 -0800, Ian wrote:

> so
> that I can easily pluck out files on another PC. I'd also like
> something which has the sense not to copy thinks which are already
> there.

Rsync should fit the bill nicely. I use e.g.:

mkdir /old /new
mount -t auto /dev/hdb8 /old
mount -t auto /dev/sda1 /new
time rsync -avx --delete /old/ /new
umount /old /new

N.B. In the rsync line, the "/" on the end of "/old" is vital...
The "--delete" is to ensure /old & /new are exact copies.

Backing up / takes about 2 minutes (after the first time), and /home
about 8 minutes (longer because /home has a 10GB VirtualBox virtual
machine file). The backup drive is external USB, formatted ext3.
Then picking out a directory or two to restore after some glitch is
easy-peasy.

Rsync is also handy for synchronising desktops and laptops (as is the
more sophisticated Unison program).

--
/\/\aurice
(Retired in Surrey, UK)
Linux Mandriva 2.6.27.5-desktop-2mnb 2009.0 32-bit
KDE 3.5.10 Virtualbox 2.0.6
(Replace "nomail.afraid" by "bcs" to reply by email)

From: Gordon Henderson on
In article <slrngknhtq.jhj.news06(a)desktop.tarcus.org.uk>,
Ian Rawlings <news06(a)tarcus.org.uk> wrote:
>On 2008-12-19, Gordon Henderson <gordon+usenet(a)drogon.net> wrote:
>
>> cp -al 01 00
>> rsync --stats -aHx --delete /path /backupdevice/00
>>
>> So while not compressed, each day will only store what gets changed,
>
>Hard links (cp -al) are not copies, they're pointers to the same data,
>so a corruption of that data knackers every one of your backups of
>that file, so only of use to protect against accidental deletion.

I know what a hard link is and what it does, and the difference between
that an a symbolic link, and I've never said that backup up to the same
server is anything other than accidental deletion prevention.

I've been building servers with 2.5x the required disk space for the
past 10 years using this method - I do it as part of my living, and even
to just keep one days worth of backup, (using rsync) it's far easier to
get files back off the disk than tape, and when working with monkeys who
accidentally delete files on a daily basis, it's essential. The rsync +
hand links is just one part of an overall strategy to manage backups
and archives.

So if this process is done on the same machine it is an accidental
deletion recovery mechanism, but it will keep historical data too, as
when the original changes, the rsync will delete the backup (leaving
historical copies in-tact) and replace it in that days copy.

So on day 1, the backup is a copy of each file (not a hard link to the
files but a real copy). Day 2 makes a heirarchy of links to the copy
then replaces files that have changed, and so on.

So if you do edit a file in the archive area, then yes, it will corrupt
all backups that are linked to that file, but not the original file.

What you need to ensure is that you can't accidentally write to the
backup area - I do this by keeping it mounted read-only most of the time,
and copying it off to another server. I think the OP (or someone in this
thread) was using removable USB drives?

Gordon
From: Ian on
On 19 Dec, 13:08, Ian Rawlings <new...(a)tarcus.org.uk> wrote:
> On 2008-12-19, Ian <ian.gro...(a)btinternet.com> wrote:
>
> > Dear All,
>
> > I've just acquired a little HP Pocket Media Drive. I'd like to use it
> > to backup /home, and I could do with some software recommendations.
> > I'd rather not have the backups rolled up into a zip or tar file, so
> > that I can easily pluck out files on another PC. I'd also like
> > something which has the sense not to copy thinks which are already
> > there.
>
> Well you can use rsync -av --delete /home/ /<media path/home-backup/
> to do it, but if the destination is a FAT partition or similar
> non-unix format, you can lose permissions, owner details and some
> files with certain characters in their filenames, e.g. files with ":"
> in their filenames can't be written to FAT partitions and those
> beginning with "." can also present problems.

Thanks. That's more or less what I did: no --delete first time and I,
as usual, forgot the trailing slash on the destination so created an
extra and easily sortable layer. The drive formatted ext3 just fine,
so permissions and names not a problem.

It's a 120GB one and it cost £40 at Morgan, which seemed a pretty
respectable deal.

Ian
From: Ian on
On 19 Dec, 12:17, Ian <ian.gro...(a)btinternet.com> wrote:

> Would a simple cp -r --preserve=all --update /home /media/HP do the
> trick sensibly? Or rsync -Rav /home /media/HP?
>
> Advice much appreciated.

Thanks very much, people. The winner is rsync - done simply by hand
this time, may automate it later.

Ian

From: Ian Rawlings on
On 2008-12-19, Gordon Henderson <gordon+usenet(a)drogon.net> wrote:

> I know what a hard link is and what it does, and the difference
> between that an a symbolic link, and I've never said that backup up
> to the same server is anything other than accidental deletion
> prevention.

Certainly, but there are people taking hints from this thread so best
watch ourselves ;-)

--
Blast off and strike the evil Bydo empire!
http://youtube.com/user/tarcus69
http://www.flickr.com/photos/tarcus/sets/
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: Compaq NS5000...
Next: Backup to DVD