owncloud / data_exporter

Export/Import for ownCloud user data
GNU General Public License v2.0
7 stars 5 forks source link

drop `/files` prefix for path in files.jsonl #111

Closed butonic closed 4 years ago

butonic commented 4 years ago

The path property of entries in files.jsonl currently always has a /filesprefix. We should drop that, so it matches the path in shares.jsonl

files.jsonl:
{
  "type": "folder",
  "path": "/files/core-10.3.0RC1",
  "eTag": "5d9c925ed57b6",
  "permissions": 31,
  "mtime": 1570542174
}
shares.jsonl:
{
  "path": "/core-10.3.0RC1",
  "shareType": "user",
  "owner": "einstein",
  "sharedBy": "einstein",
  "sharedWith": "marie",
  "permissions": 31,
  "expirationDate": null,
  "password": null,
  "name": null,
  "token": null
}

versions and trashbin will also have to reference the files via the path. we would have to get rid of /files everywhere. It is completely redundant, as a users storage always starts in his home folder.

IljaN commented 4 years ago

Are you sure? There can be files in /$USER/files/foo.txt but also in /$USER/thumbnails/foo.jpg

butonic commented 4 years ago

and in files_versions and in files_trashbin. what about uploads? what about cache or avatars

Yes, I am sure. the should go into separate jsonl files. files.jsonl should only contain file metadata from the users home directory, which brings us directly to the question of external storages: https://github.com/owncloud/data_exporter/issues/21

IljaN commented 4 years ago

@butonic After looking further in to it I am not sure if we can do this: As /files/ is also a directory which has an etag:

{
  "type": "folder",
  "path": "/files",
  "eTag": "5db978fd39b4f",
  "permissions": 31,
  "mtime": 1572436221
}

Will there be sideffects if we omit it from the export?

IljaN commented 4 years ago

Introduced "/" folder in export to keep etag