Correct. Copy understands block devices, not character ones such as a
The original question, I think, was how to do a backup? If so, you need
to remember that the contents of the pc directories are adjusted. The
filenames are mangled, the attributes (ownership and rights) are stored
and the files themselves are probably compressed. Yes, you could dump
the entire pc directory to tape and recover it as well (with dump, tar,
etc) but you would still need BackupPC to convert the files.
The pool directories are built on the hash of client files. They also
contain hard links, just like the pc directories (based on the fact that
if an original file has a hard link created against it, both "files" are
now links). Thus, you could say the client data doesn't exist in either
the pc directory OR the pool directory. Instead both pool and pc
directory entries *point* to the actual data. Remember, when you create
a hard link, you are creating a pointer to a file (or directory in
Linux) and it is indistinguishable from the original inode entry. Think
of it as two C pointers pointing to the same address on the heap.
Personally, I wouldn't dump the pool directories as they don't represent
the client directory structure, i.e., they are hashes. But, if you do
go that route and you also dump the pc directories, you better make sure
your dump/tar program understands hard links or you will send multiple
copies of the same client data to tape. Thus, if three clients all had
the same 1GB file and they all have hard links to it, you would end up
streaming an extra 2GB of data to tape. Not so bad until you multiply
your client base by 500 or so.
I've just started using BackupPC myself so I have yet to implement my
own archive system. Craig has a good idea in using a virtual host to
send backups to tape. I've given some thought toward using the
BackupPC_tarCreate to redirect the stream to tape instead of to the
"restore.tar" file. Probably not a big modification but I would need to
make sure the BackupPC daemon wasn't trying to backup the client at the
same time. Perhaps some type of IPC lock message... dunno. BackupPC
really isn't coded to make proper tape archives. It's an on-line backup
system (and a kick-ass one at that).
So, I wouldn't backup any pool directory. If anything, you could backup
the individual pc directories but remember you need BackupPC if you pull
them back off tape. Don't even get me started on archiving problems
(BackupPC version matching vs old archives, etc.). And if you want to
send your archive to some other location or business, better make sure
they use BackupPC, too.
When I come up with a good solution, I'll post.
From: Johnny L. Wales [mailto:johnny@...]
Sent: Monday, June 23, 2003 2:22 PM
Subject: Re: [BackupPC-users] A question about tapes
> The pc directory contains just log files and hard links to cpool. I'm
> not sure but it seems to me that tar will *copy* every hard link to
> cpool, so you'll end up with several copies of each files. Can't you
> just do a "cp -a /home/backuppc/data /dev/st0" or something similar?
I'm pretty sure you can't just cp -a to a tape drive, because that
a regular file system, which tapes don't have. They're just big, long,
sequential strings of data, and you pretty well have to use tar or dump
to simulate the operations of a file system. Or, that's the way it was
explained to me.
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
BackupPC-users mailing list