Needs to document what metadata is preserved #455

Closed
jgoerzen opened this Issue May 8, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@jgoerzen

jgoerzen commented May 8, 2015

I cannot find any information on what metadata is preserved by syncany. This is critical for uses as backups, but in many other situations as weel. Examples of what I'd like to see:

  • symlinks
  • hard links
  • POSIX uid, gid of owner
  • POSIX permission bits
  • ACLs from various platforms
  • Resource forks / extended attributes / alternate data streams
  • mtime/atime/ctime (last modified time, etc.)

At the moment, it looks like symlinks are preserved, but I can't find as clear information on the rest.

@binwiederhier

This comment has been minimized.

Show comment
Hide comment
@binwiederhier

binwiederhier May 9, 2015

Member

You can see for yourself by running sy init --no-encryption --no-compression and then looking at the database-* files. In a nutshell:

Yes:

  • Symlinks are stored as such
  • POSIX permissions are stored
  • Last modified time is stored

No:

  • Hardlinks are NOT stored/detected (not efficient), but data is not stored twice
  • POSIX uid/gid are NOT stored
  • ACLs are NOT stored
  • Extended attributes are NOT stored (see #392)
  • Access time and create time are NOT stored
<?xml version="1.0" ?>
<database version="1">
    <databaseVersions>
        <databaseVersion>
            <header>
                <time value="1431192455473"/>
                <client name="QTRcguLkUsCJGejtvSRI"/>
                <vectorClock>
                    <client name="QTRcguLkUsCJGejtvSRI" value="2"/>
                </vectorClock>
            </header>
            <chunks>
                <chunk checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" size="14"/>
            </chunks>
            <multiChunks>
                <multiChunk id="28d35a0e46ee63a8cdb93604c4c71a31df652289" size="14">
                    <chunkRefs>
                        <chunkRef ref="476b8cacca1f156cf33e1127384c73f1fafbdb5f"/>
                    </chunkRefs>
                </multiChunk>
            </multiChunks>
            <fileContents>
                <fileContent checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" size="14">
                    <chunkRefs>
                        <chunkRef ref="476b8cacca1f156cf33e1127384c73f1fafbdb5f"/>
                    </chunkRefs>
                </fileContent>
            </fileContents>
            <fileHistories>
                <fileHistory id="4c131e6860973b2b3f652013cd04914dda9710fb">
                    <fileVersions>
                        <fileVersion version="1" type="SYMLINK" status="NEW" path="link.txt" size="9" lastModified="1431192442000" linkTarget="hello.txt" updated="1431192455455" dosattrs="--a-" posixperms="rwxrwxrwx"/>
                    </fileVersions>
                </fileHistory>
                <fileHistory id="0273166cee3c39aa9d574b13cd81ae7ef85b30f3">
                    <fileVersions>
                        <fileVersion version="2" type="FILE" status="CHANGED" path="hello.txt" size="14" lastModified="1431192450000" updated="1431192455461" checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" dosattrs="--a-" posixperms="rw-r--r--"/>
                    </fileVersions>
                </fileHistory>
            </fileHistories>
        </databaseVersion>
    </databaseVersions>
</database>
Member

binwiederhier commented May 9, 2015

You can see for yourself by running sy init --no-encryption --no-compression and then looking at the database-* files. In a nutshell:

Yes:

  • Symlinks are stored as such
  • POSIX permissions are stored
  • Last modified time is stored

No:

  • Hardlinks are NOT stored/detected (not efficient), but data is not stored twice
  • POSIX uid/gid are NOT stored
  • ACLs are NOT stored
  • Extended attributes are NOT stored (see #392)
  • Access time and create time are NOT stored
<?xml version="1.0" ?>
<database version="1">
    <databaseVersions>
        <databaseVersion>
            <header>
                <time value="1431192455473"/>
                <client name="QTRcguLkUsCJGejtvSRI"/>
                <vectorClock>
                    <client name="QTRcguLkUsCJGejtvSRI" value="2"/>
                </vectorClock>
            </header>
            <chunks>
                <chunk checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" size="14"/>
            </chunks>
            <multiChunks>
                <multiChunk id="28d35a0e46ee63a8cdb93604c4c71a31df652289" size="14">
                    <chunkRefs>
                        <chunkRef ref="476b8cacca1f156cf33e1127384c73f1fafbdb5f"/>
                    </chunkRefs>
                </multiChunk>
            </multiChunks>
            <fileContents>
                <fileContent checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" size="14">
                    <chunkRefs>
                        <chunkRef ref="476b8cacca1f156cf33e1127384c73f1fafbdb5f"/>
                    </chunkRefs>
                </fileContent>
            </fileContents>
            <fileHistories>
                <fileHistory id="4c131e6860973b2b3f652013cd04914dda9710fb">
                    <fileVersions>
                        <fileVersion version="1" type="SYMLINK" status="NEW" path="link.txt" size="9" lastModified="1431192442000" linkTarget="hello.txt" updated="1431192455455" dosattrs="--a-" posixperms="rwxrwxrwx"/>
                    </fileVersions>
                </fileHistory>
                <fileHistory id="0273166cee3c39aa9d574b13cd81ae7ef85b30f3">
                    <fileVersions>
                        <fileVersion version="2" type="FILE" status="CHANGED" path="hello.txt" size="14" lastModified="1431192450000" updated="1431192455461" checksum="476b8cacca1f156cf33e1127384c73f1fafbdb5f" dosattrs="--a-" posixperms="rw-r--r--"/>
                    </fileVersions>
                </fileHistory>
            </fileHistories>
        </databaseVersion>
    </databaseVersions>
</database>
@binwiederhier

This comment has been minimized.

Show comment
Hide comment
@binwiederhier

binwiederhier May 9, 2015

Member

I guess we should add that as information to the User Guide somewhere

  • Add ^^ to user guide
Member

binwiederhier commented May 9, 2015

I guess we should add that as information to the User Guide somewhere

  • Add ^^ to user guide
@binwiederhier

This comment has been minimized.

Show comment
Hide comment
@binwiederhier

binwiederhier May 10, 2015

Member

@jgoerzen Does that answer your question?

Member

binwiederhier commented May 10, 2015

@jgoerzen Does that answer your question?

@jgoerzen

This comment has been minimized.

Show comment
Hide comment
@jgoerzen

jgoerzen May 13, 2015

Yes, that is PERFECT and it would be great if that info were added to the User Guide. Thanks!

Yes, that is PERFECT and it would be great if that info were added to the User Guide. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment