This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Hardlinks - Save / Restore into Textfiles possible

CIFS/SMB network sharing.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
redline
Starter
Starter
Posts: 69
Joined: 29 Dec 2012 19:23
Status: Offline

Hardlinks - Save / Restore into Textfiles possible

Post by redline »

Hello
Is there a possibility that a Windows 7 Client, connected over CIFS/Samba to a N4F Server
running a ZFS Pool , is able to "see" hardlinks ???

I have several hard link(s) to the same file(s).

Example:
Pool\Original\2015 - Tina Turner - Private Dancer (192kbit) .mp3

Hardlinks:
Pool\Year\2015 - Tina Turner - Private Dancer.mp3
Pool\Interpret\T\Tina Turner - Private Dancer.mp3
Pool\Title\Private Dancer - Tina Turner.mp3

In the past i had a solution only to Sync the "Original" Directory with my backup harddisk.
With a selfmade script i was able to save the hardlinks in a text file. (hlscan.exe)
which was also saved on the backup harddisk.

After a crash i was able to restore the "Original" Directory and rebuilded all my handmade hardlinks
over this saved textfile. This runs perfectly with XP on NTFS.

Now, under Windows 7 i still can create Hardlinks from Windows on my ZFS Pool (Samba) with
the Windows Tool "Hardlink Shell Extension".

But under Windows 7 the Ref Counter is up and away, so i cannot see anymore that a given file has
3,4 or 5 Inode entries.

If i want to backup 250GB of files which have 4 hardlinks each, every tool copies 1000Gb because
the OS didn't report, that there are hardlinks. (over the Network)
But the backup harddisk cannot take 4 times the capacity and it takes also ages this way.
I find solutions on a Local NTFS but not over the Network ...

Last, I tried a Programm from the Windows world, which is called Hardlink Backup.
Talking with the author and studying his detailed Log files, he told me that N4F OS didn't give the Infos
that these files are hardlinks. I don't know if this is a ZFS or Samba Thing issue.

Is there a way , (maybe UNIX Extensions = ON) or something else in Samba.cfg which can
activate the reporting of hardlinks to Windows.

I think UNIX Extensions could do the trick but have maybe other side effects, i don't want ...

.... or is there maybe another way to save and restore only hardlinks via a Textfile (maybe Rsync)
on the Unix side over SSH at the command line.

I'm searching up and down the forums but cannot find a solution.

Jack Foobar
experienced User
experienced User
Posts: 107
Joined: 07 Jul 2015 01:24
Status: Offline

Re: Hardlinks - Save / Restore into Textfiles possible

Post by Jack Foobar »

I would simply put a command script in your storage directory, and stick it in cron to backup every whenever weeks/days.

http://www.cyberciti.biz/faq/linux-unix ... ard-links/

Or you can install rsnapshot, which is more user friendly and compression happy.
http://rsnapshot.org/download.html (pkg install rsnapshot)

You can't backup underlying directories using samba. Samba is an application presentation. It is not directory structure. It's just presenting BS so windows can read it. Leave samba out of it. Leave windows out of it. The most you want out of windows is a file mount to dump this shit onto.

redline
Starter
Starter
Posts: 69
Joined: 29 Dec 2012 19:23
Status: Offline

Re: Hardlinks - Save / Restore into Textfiles possible

Post by redline »

I have installed Cygwin, Rsync on the Windows Client.
In N4F i activated the Rsync Server and added a Module called "Test"

The following command line , started from Cygwin Shell, should preserve hardlinks "H"
But again all hardlinks are only copied on a file base.

rsync -aHrvL --inplace 192.168.178.31/Test /cygdrive/d/Destination

redline
Starter
Starter
Posts: 69
Joined: 29 Dec 2012 19:23
Status: Offline

Re: Hardlinks - Save / Restore into Textfiles possible

Post by redline »

Hardlinks are now copied
After i used "::" in the command line, it worked.

rsync -arvHL 192.168.178.31::Test /cygdrive/d/Destination

I stumbled over the synthax somewhere and have to find out the sense of these "::"

Post Reply

Return to “CIFS/SMB (Samba)”