@textile/hub > Buckets > archive
Buckets.archive() method
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
(Experimental) Store a snapshot of the bucket on Filecoin.
Signature:
archive(key: string, options?: ArchiveOptions, skipAutomaticVerifiedDeal?: boolean): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
options | ArchiveOptions | An object to set options that control the behavor of archive. |
skipAutomaticVerifiedDeal | boolean | skips logic that automatically uses available datacap to make a verified deal for the archive. |
Returns:
Promise<void>
Remarks
Filecoin support is experimental. By using Textile, you are acknowledging that you understand there may be risks to storing your content on or using decentralized storage services.
Example
Archive a Bucket.
import { Buckets } from '@textile/hub'
async function archive (buckets: Buckets, key: string) {
await buckets.archive(key)
}