gdrive-backup-cron

1.0.8 • Public • Published

gdrive-backup-cron

const BackupService = require("gdrive-backup-cron");

let service = new BackupService({
  drive: {
    auth: {
      /* google service account configuration here*/
    },
    folder: "google drive shared folder id here",
    keep: 1,
  },
  sourceFolder: "source folder here",
  auto: {
    cron: "00 00 00 * * *",
    timezone: "Turkey",
  },
});

service.on("backup", (name, id) => {});
service.on("restore", (name, id) => {});

// local disk
service.backup({ saveTo: "./test.zip" }).then(() => {
  service.restore({ backupPath: "./test.zip" }).then(() => {});
});

// google drive
service.backup({ backupName: "test.zip" }).then(() => {
  service.restore({ backupName: "test.zip" }).then(() => {});
});

Package Sidebar

Install

npm i gdrive-backup-cron

Weekly Downloads

0

Version

1.0.8

License

ISC

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • mdemircioglu