import { Backups } from "https://deno.land/x/embassyd_sdk@v0.3.4.0.0-alpha2/lib/esm/mod.js";
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()