diff --git a/api/@ohos.data.distributedData.d.ts b/api/@ohos.data.distributedData.d.ts index 9dc938384c488116ccabeba2b3546d29dfaa21ab..e97e1a791c4b494969c35b9abfa7de29aabea834 100644 --- a/api/@ohos.data.distributedData.d.ts +++ b/api/@ohos.data.distributedData.d.ts @@ -1166,6 +1166,36 @@ declare namespace distributedData { delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback); delete(predicates: dataSharePredicates.DataSharePredicates): Promise; + /** + * Backs up a database in a specified name. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param file Indicates the name that saves the database backup. + */ + backup(file:string, callback: AsyncCallback):void; + backup(file:string): Promise; + + /** + * Restores a database from a specified database file. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param file Indicates the name that saves the database file. + */ + restore(file:string, callback: AsyncCallback):void; + restore(file:string): Promise; + + /** + * Delete a backup files based on a specified name. + * + * @since 9 + * @syscap SystemCapability.DistributedDataManager.KVStore.Core + * @param files list Indicates the name that backup file to delete. + */ + deleteBackup(files:Array, callback: AsyncCallback>):void; + deleteBackup(files:Array): Promise>; + /** * Registers a {@code KvStoreObserver} for the database. When data in the distributed database changes, the callback in * {@code KvStoreObserver} will be invoked.