I want to build a small backup server for my essential data. I'm interested in not losing any of the features that Windows/NTFS offers, like:

  • File Creation Date
  • ADS metadata(comments, tags, etc)
  • File Creation Date preservation when copying files with tools that have option to preserve File Creation Date when copying like TeraCopy/RichCopy/FastCopy, etc.

From what I know, the most used file system for NASes is EXT4. Can I maintain all these features when using SMB to access an EXT4 partition?

  • 1
    Which version of Windows are you using? – David Jan 1 '16 at 15:31

Theoretically it is possible, yes. ext4 supports all the basic timestamps (modify, metadata change, access), including the so-called “birth” timestamp. However, Samba doesn’t use the latter (neither does stat, by the way), it just presents the oldest timestamp as the creation date.

Samba supports Alternate Data Streams via vfs_streams_xattr, storing them in POSIX Extended Attributes. However, I found that these streams, while accessible when you know the name, don’t show up when listing them. That also means they’re not copied back.

Additionally, you could use the vfs_acl_xattr module to keep exact copies of NTFS Access Control Lists.

TL;DR: While possible, interoperability shortcomings make it unusable.

| improve this answer | |

Some points need clarifying, for example why don't you set up the server as a Windows computer with real NTFS disk.

If the problem is having a computer without an available Windows serial, you could install Microsoft’s free operating system, Hyper-V Server 2012 R2, available here, add storage and finally create a network share. Hyper-V Server has no GUI, but uses the same command prompt as Windows, so creating network shares is done using the net share command.

This will get you a real NTFS disk, not a problematic not-really-the-same Linux equivalent.

The downside is that one cannot access files on the network share using the UNC syntax.

| improve this answer | |

EXT4 supports the same timestamps and precision as NTFS does, but their metadata and ACL structures are completely different. If you want to preserve NTFS metadata and ACLs on an EXT4 filesystem, you're going to need a container format that supports these things. You also must "push" the data from Windows rather than "pulling" it from the backup server.

Fortunately, there are a number of container formats available that can do this. Microsoft's own VHD format is probably your best bet. They're not just for virtual machines. Windows allows you to mount VHDs as a drive letter natively in Disk Manager. You can then use TeraCopy/RichCopy/FastCopy, etc to copy the files to it.

Additionally, Microsoft's WIM format also supports NTFS metadata and permissions, and you can also mount a WIM file. The drawback to WIM is that you must unmount /commit changes when you're done and it's horribly slow. On the upside, however, the tool for managing WIM files (DISM) is built-in to Windows and preserves metadata and ACLs by default. If you boot Windows offline (to a Windows PE environment), you can clone the entire OS to a WIM, no 3rd party tools required.

There are also 3rd party options available too. WinRAR is capable of backing this information up and is free (but not open source). There's also Acronis TrueImage, which is commercial backup software, but supports all NTFS features.

Really, you have a lot of options here, but EXT4 and Linux alone are not enough to support the NTFS data structures you're trying to preserve.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.