FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-23-2012, 07:52 AM
Thufir
 
Default hard links (leafnode)

I'm backing up leafnode NNTP server contents as per:

"It is, however, important that tar, pax, cpio, or whichever tool you
use, is (A) capable of, and (B) instructed to save and restore
hard links as hard links (rather than just copies). Each article has
only one file (inode, technically speaking) with multiple names (= hard
links). This makes sure that we do not waste space (inodes and blocks)
on the file systems while maintaining fast access both by article number
and by message ID."

http://article.gmane.org/gmane.network.leafnode/4647

and am wondering about hard links. I'm using ext4:

root@dur:~# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/dur-root ext4 27637336 18809728 7442136 72% /
udev devtmpfs 1006672 4 1006668 1% /dev
tmpfs tmpfs 405680 840 404840 1% /run
none tmpfs 5120 4 5116 1% /run/lock
none tmpfs 1014192 396 1013796 1% /run/shm
cgroup tmpfs 1014192 0 1014192 0% /sys/fs/
cgroup
/dev/sdb1 ext2 233191 48285 172465 22% /boot
root@dur:~#


I'll be using DAR, <dar.linux.free.fr>, and it looks like DAR should
handle hard links fine:

"HARD LINK CONSIDERATION


hard links are properly saved in any case and properly restored if
possible. For example, if restoring across a mounted file system, hard
linking will fail, but dar will then duplicate the inode and file
contents, issuing a warning. Hard link support includes the following
inode types: plain files, char devices, block devices, symlinks (Yes, you
can hard link symbolic links! Thanks to Wesley Leggette for the info ;-)
)"

http://dar.linux.free.fr/doc/Features.html

Just want to make sure before I do the backup. It should be fine? Just
backup, and then I can put it back onto the spool at /var/news?


thanks,

Thufir


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2012, 09:55 AM
PleegWat
 
Default hard links (leafnode)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/23/2012 09:52 AM, Thufir wrote:
> Just want to make sure before I do the backup. It should be fine?
> Just backup, and then I can put it back onto the spool at
> /var/news?

Sounds like it, but if you're concerned, why not just verify it
yourself? Using tar as an example:

$ mkdir test
$ echo 'some text' > test/a
$ ln test/a test/b
$ ls -l test
total 8
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 b
$ tar -cvzf test.tgz test
test/
test/a
test/b
$ rm -rf test
$ tar -xvzf test.tgz
test/
test/a
test/b
$ ls -l test
total 8
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 2 pleegwat pleegwat 10 Sep 23 11:50 b


The '2' in the second column indicates the test file has 2 hardlinks
to it. Compare the following output after archiving and restoring
using 'zip', which does not support hardlinks:

$ ll test
total 8
- -rw-rw-r-- 1 pleegwat pleegwat 10 Sep 23 11:50 a
- -rw-rw-r-- 1 pleegwat pleegwat 10 Sep 23 11:50 b


PleegWat
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQXtyKAAoJEAM6sLJjDJaMIoYIAK7LdPOeVI 6IrC68XBR6JPAG
Z9USL1q4NFQORtkjJ5gLuVObEcew+aVJ7SMJW3a71MGXwh7OBe bzZPMXcj13/baD
UHBsB1CuBIt3EY41mwtbQcmro6G5NjpENfsYojimszfsmRN0ih zYpdXBEiwpdRS1
QUmpQ7eZX8LLJtmkB40KfldsS/pqqbYSocHCRHbH1n0Cr5k+8LTdu5alXEpMxSFG
yJ1DqY9ip0GKd83qg+tNoFht29SfmQz6pBbDiEMgDXs+TYQrOP xbz/nE2UtfzChX
SUgQ/F74QPyIEPGN3NdWTU8KUhLoKfQCo8igRdMNP/eSjONEj4Wy0nskPq2uAwA=
=S7h0
-----END PGP SIGNATURE-----

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-24-2012, 12:31 PM
Adam Funk
 
Default hard links (leafnode)

On 2012-09-23, Thufir wrote:

> I'm backing up leafnode NNTP server contents as per:
>
> "It is, however, important that tar, pax, cpio, or whichever tool you
> use, is (A) capable of, and (B) instructed to save and restore
> hard links as hard links (rather than just copies). Each article has
> only one file (inode, technically speaking) with multiple names (= hard
> links). This makes sure that we do not waste space (inodes and blocks)
> on the file systems while maintaining fast access both by article number
> and by message ID."
>
> http://article.gmane.org/gmane.network.leafnode/4647
...
> Just want to make sure before I do the backup. It should be fine? Just
> backup, and then I can put it back onto the spool at /var/news?

I think even if you restore the spool incorrectly (with duplicate
files rather than hard links, that is), you can run texpire with the
'-r' option ("repair") and it will fix them.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 11:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org