Phase 0: per-user backup/restore through user_migration (spike E)
RepositoryExportDestination / RepositoryImportSource implement the public OCP\UserMigration interfaces on top of the repository, so user_migration's migrators (calendar, contacts, trashbin, account, files) export straight into the encrypted repository. Spike E (NC34): export 0.8s, unchanged second export stores nothing; after deleting the user, import restores account, files (bit-identical), calendar event and contact. Findings: calendars/address books come back as 'migrated-*' with new object URIs; importing over an existing user duplicates contacts and adds a migrated birthday calendar; creating the user on import needs >128 MB (password_policy word list).
This commit is contained in:
@@ -180,6 +180,16 @@ final class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string> $blobIds
|
||||
* @return \Generator<string> verified blob contents, in order
|
||||
*/
|
||||
public function readBlobs(array $blobIds): \Generator {
|
||||
foreach ($blobIds as $id) {
|
||||
yield $this->loadBlob($id);
|
||||
}
|
||||
}
|
||||
|
||||
/** Small encrypted objects (manifests). */
|
||||
public function putObject(string $path, string $data): void {
|
||||
self::putString($this->backend, $path, $this->cipher->encryptString($data, 'object:' . $path));
|
||||
|
||||
Reference in New Issue
Block a user