3

Today I was devastated to see that a software project that I had backed up in my external HDD was almost completely ruined because the execution (and other permissions) where "reset" because the external HDD uses NTFS filesystem.

Is there a way to backup data to an NTFS or FAT32 filesystem while preserving permissions set in linux?

1 Answers1

6

Yes you can use tar to create an archive on the ntfs filesystem. tar archives preserve linux owner and permission info.

If you use linux acls and extended attributes look for the options in the tar manpage.

You can also save your ownership and permission info recursivly by getfacl -r folder > permissions.txt.

You can save that file, too and restore with setfacl.

Off topic:

By the way:

NEVER use windows explorer to copy folders to another disk as a backup if you have long directory paths, it cuts away everything with a path longer 255 charakters SILENTLY (i hope i remember the number correctly)

Ntfs can store longer paths just fine and robocopy can copy them but not widows explorer.

I lost a java project that way once ...

DavidPostill
  • 162,382