import { Backups } from "https://deno.land/x/embassyd_sdk@v0.3.4-alpha1/mod.ts";
This utility simplifies the volume backup process.
export const { createBackup, restoreBackup } = Backups.volumes("main").build();
Changing the options of the rsync, (ie exludes) use either
Backups.volumes("main").set_options({exclude: ['bigdata/']}).volumes('excludedVolume').build()
// or
Backups.with_options({exclude: ['bigdata/']}).volumes('excludedVolume').build()
Using the more fine control, using the addSets for more control
Backups.addSets({
srcVolume: 'main', srcPath:'smallData/', dstPath: 'main/smallData/', dstVolume: : Backups.BACKUP
}, {
srcVolume: 'main', srcPath:'bigData/', dstPath: 'main/bigData/', dstVolume: : Backups.BACKUP, options: {exclude:['bigData/excludeThis']}}
).build()
Methods
addSets(...options: BackupSet[])
build()
set_options(options?: Partial<T.BackupOptions>)
volumes(...volumeNames: string[])
Static Methods
addSets(...options: BackupSet[])
volumes(...volumeNames: string[])
with_options(options?: Partial<T.BackupOptions>)