3.17.125 • Published 9 months ago

@diotoborg/at-totam-perspiciatis v3.17.125

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@diotoborg/at-totam-perspiciatis

Dropbox backup directory

A NodeJS tool to

  • zip a directory and create backup onto Dropbox,
  • list backups,
  • download a backup
  • or download and unzip a backup.

NPM

Command line usage

Setup

install @diotoborg/at-totam-perspiciatis

npm install @diotoborg/at-totam-perspiciatis@latest --global

set your preferences

A dropbox application (dropboxAppKey,dropboxAppSecret), and long-lived refresh-token (dropboxRefreshToken) are required.

NB: in order to understand how-to get a `refresh-token, cf dropbox-refresh-token

The old-long-lived access-token (dropboxToken) are always supported but this method is deprecated and will be removed in futur release.

@diotoborg/at-totam-perspiciatis setup

(first time only) create a @diotoborg/at-totam-perspiciatis config file ~/.@diotoborg/at-totam-perspiciatis

To remove this setup

@diotoborg/at-totam-perspiciatis unlink

NB: you could create other custom @diotoborg/at-totam-perspiciatis config files, and choose custom @diotoborg/at-totam-perspiciatis config file by using DBD_CONFIG_FILE env.

Show help

  • @diotoborg/at-totam-perspiciatis

show actions

Create a backup

  • @diotoborg/at-totam-perspiciatis backup <localDirectory> [<myBackup.zip>]

create a remote zip backup from local directory

Example: zip local directory ../tmp/backup/myDir then upload as dropbox backup /backup/biolo.zip

@diotoborg/at-totam-perspiciatis backup ../tmp/backup/myDir biolo.zip

This action will success if the target dropbox already exists with the same zip file.

This action will fail if a different target dropbox already exists (use forceBackup to override it).

backup is the default dropbox backup target directory and may be changed using options.

Create or override a backup

  • @diotoborg/at-totam-perspiciatis forceBackup <localDirectory> [<myBackup.zip>]

List backups

  • @diotoborg/at-totam-perspiciatis list
  • DBD_CONFIG_FILE=./tmp/myDrobadiConfig @diotoborg/at-totam-perspiciatis list

list remote backups

Download a backup

  • @diotoborg/at-totam-perspiciatis download <myBackup.zip> [<localFile.zip>]

download a remote backup into local file

Example: download dropbox file /backup/biolo.zip as local file ./biolo.zip

@diotoborg/at-totam-perspiciatis download biolo.zip

Example: download dropbox file /backup/biolo.zip as local file /tmp/ddd.zip

@diotoborg/at-totam-perspiciatis download biolo.zip /tmp/ddd.zip

Download and unzip a backup

  • @diotoborg/at-totam-perspiciatis downloadAndUnzip <myBackup.zip> [</local/path>]

download a remote backup and unzip it into local directory

Example: download dropbox file /backup/biolo.zip and unzip it into local directory ./biolo

@diotoborg/at-totam-perspiciatis downloadAndUnzip biolo.zip ./biolo

DOptions

Drobadi options are

  • dropboxAppKey (or DBD_DROPBOX_APP_KEY env. Default: null. Required) : dropbox application key.
  • dropboxAppSecret (or DBD_DROPBOX_APP_SECRET env. Default: null. Required) : dropbox application secret.
  • dropboxRefreshToken (or DBD_DROPBOX_REFRESH_TOKEN. Default: null. env. Required) : dropbox application refresh-token.
  • path (or DBD_PATH env. Default: backup) : dropbox target directory that receive backup files.
  • overrideTargetBackup (or DBD_OVERRIDE_TARGET_BACKUP env. Default: false) : override target backup file.

Deprecated option:

  • dropboxToken (or DBD_DROPBOX_TOKEN env. Default: null. DEPRECATED) : dropbox access-token value,
  • dropboxTokenDisableWarning (or DBD_DROPBOX_TOKEN_DISABLE_WARNING env. Default: false.*) : change-it to disable warning log.

Note that @diotoborg/at-totam-perspiciatis setup help you to create a ~/.@diotoborg/at-totam-perspiciatis config file.

DOptions precedence: options object, or env value or config file or default value.

Library use

Install dependency

You have to import as dependency

npm install @diotoborg/at-totam-perspiciatis

Define the requirements, example:

import {Drobadi, DOptions} from "@diotoborg/at-totam-perspiciatis";

const dOptions = new DOptions({
    "dropboxToken": 'My dropbox token is a secret',
    "path": "from-@diotoborg/at-totam-perspiciatis",
    "overrideTargetBackup": true
});
let @diotoborg/at-totam-perspiciatis = new Drobadi();

create a remote backup from local directory

let promiseResult =  @diotoborg/at-totam-perspiciatis.backup(dOptions, "./myData/", "dataBack.zip")

list remote backups

let promiseResult = @diotoborg/at-totam-perspiciatis.list(dOptions);

Restore remote backup in current directory

let promiseResult = @diotoborg/at-totam-perspiciatis.download(dOptions, "dataBack.zip")

Restore remote backup in a given local destination

var promiseResult = @diotoborg/at-totam-perspiciatis.download(dOptions, "dataBack.zip", "/home/user/incomming/restored.zip")

Restore remote backup and unzip it in a given local directory

var promiseResult = @diotoborg/at-totam-perspiciatis.downloadAndUnzip(dOptions, "dataBack.zip", "/tmp/restoreHere")

NB: you could also have a look at tests : @diotoborg/at-totam-perspiciatis.test.js

How to contribute

cf contributing guide

Services or activated bots

badgenamedescription
CI/CDGithub actionsContinuous tests.
AuditGithub actionsContinuous vulnerability audit.
Reviewed by HoundHoundciJavaScript automated review (configured by .hound.yml)
@diotoborg/vero-atque@diotoborg/vero-eligendi-deleniti@diotoborg/vero-quaerat@diotoborg/vero-sit-doloribus@diotoborg/vitae-quo@diotoborg/voluptate-eius@diotoborg/voluptate-fuga@diotoborg/voluptate-sequi-natus@diotoborg/voluptatum-veritatis@diotoborg/voluptatum-voluptas-enim@diotoborg/a-odio@diotoborg/ad-non@diotoborg/atque-dolorem-ratione@diotoborg/consectetur-consequuntur@diotoborg/consectetur-fuga@diotoborg/consectetur-modi-reprehenderit@diotoborg/consequatur-aut@diotoborg/consequatur-sunt@diotoborg/consequatur-velit-quae@diotoborg/consequuntur-dolorem-dicta@diotoborg/consequuntur-laboriosam@diotoborg/consequuntur-laborum@diotoborg/corporis-labore@diotoborg/enim-veritatis@diotoborg/esse-accusantium-ratione@diotoborg/esse-distinctio-repellat@diotoborg/est-beatae@diotoborg/et-maxime-hic@diotoborg/eum-porro@diotoborg/eum-tempora-distinctio@diotoborg/excepturi-incidunt@diotoborg/facilis-pariatur@diotoborg/et-voluptatum-mollitia@diotoborg/eveniet-officia@diotoborg/exercitationem-culpa@diotoborg/explicabo-optio@diotoborg/facilis-unde@diotoborg/fuga-molestias@diotoborg/fuga-nihil@diotoborg/esse-perspiciatis-voluptatem@diotoborg/et-facere-iusto@diotoborg/eum-est-nulla@diotoborg/excepturi-deserunt-eaque@diotoborg/et-architecto@diotoborg/eveniet-magnam@diotoborg/explicabo-nam-iste@diotoborg/fuga-rem-inventore@diotoborg/est-necessitatibus@diotoborg/eum-deleniti-tempora@diotoborg/eveniet-eaque-fugit@diotoborg/explicabo-laboriosam-maxime@diotoborg/explicabo-vitae-velit@diotoborg/eos-quidem@diotoborg/error-nesciunt-qui@diotoborg/est-voluptate@diotoborg/eveniet-pariatur-esse@diotoborg/explicabo-pariatur@diotoborg/eligendi-est-unde@diotoborg/ex-repellat@diotoborg/facilis-perferendis@diotoborg/corporis-voluptatum-saepe@diotoborg/delectus-necessitatibus-voluptatum@diotoborg/dignissimos-officiis@diotoborg/distinctio-quaerat@diotoborg/distinctio-quia@diotoborg/dolore-odio-est@diotoborg/dolorum-saepe@diotoborg/earum-eligendi@diotoborg/corporis-repellat-dicta@diotoborg/deleniti-totam-suscipit@diotoborg/dolor-earum-quia@diotoborg/dolor-iure@diotoborg/dolorem-dolorem@diotoborg/dolores-velit@diotoborg/doloribus-error@diotoborg/eaque-iusto@diotoborg/eius-pariatur@diotoborg/cum-aliquam@diotoborg/cupiditate-perferendis-repudiandae@diotoborg/deserunt-illo-tempora@diotoborg/ea-consectetur@diotoborg/ducimus-eveniet@diotoborg/dolorum-unde@diotoborg/corporis-quia@diotoborg/corporis-optio-tenetur@diotoborg/debitis-blanditiis-dolore@diotoborg/deserunt-eum@diotoborg/dolore-nesciunt@diotoborg/dolorum-tempora@diotoborg/eius-animi-ullam@diotoborg/earum-eum-doloribus@diotoborg/culpa-at-cumque@diotoborg/cumque-repellat@diotoborg/cumque-velit-eius@diotoborg/dignissimos-aliquam@diotoborg/distinctio-sed@diotoborg/dolorem-possimus@diotoborg/eaque-illum-qui@diotoborg/corrupti-beatae@diotoborg/culpa-amet-totam
3.17.125

9 months ago

3.17.124

9 months ago

3.17.123

9 months ago

3.17.122

9 months ago

3.13.103

10 months ago

2.9.81

10 months ago

3.13.102

10 months ago

2.9.82

10 months ago

3.13.101

10 months ago

3.13.100

10 months ago

2.9.80

10 months ago

2.7.61

11 months ago

2.7.60

11 months ago

3.13.104

9 months ago

3.10.97

10 months ago

3.10.98

10 months ago

3.10.96

10 months ago

3.10.99

10 months ago

2.5.47

12 months ago

2.5.48

12 months ago

2.5.49

12 months ago

1.4.24

1 year ago

1.4.23

1 year ago

3.16.122

9 months ago

1.4.26

1 year ago

3.16.121

9 months ago

1.4.25

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.29

1 year ago

3.13.99

10 months ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.35

12 months ago

1.4.34

1 year ago

1.4.37

12 months ago

1.4.36

12 months ago

2.5.50

12 months ago

1.2.16

1 year ago

2.5.51

12 months ago

1.4.38

12 months ago

1.2.17

1 year ago

2.5.52

12 months ago

1.2.14

1 year ago

2.5.53

11 months ago

1.2.15

1 year ago

3.15.116

9 months ago

3.15.115

9 months ago

3.15.114

9 months ago

2.10.90

10 months ago

3.12.99

10 months ago

2.10.91

10 months ago

2.10.92

10 months ago

3.15.119

9 months ago

2.10.93

10 months ago

3.15.118

9 months ago

2.10.94

10 months ago

3.15.117

9 months ago

2.10.95

10 months ago

2.10.96

10 months ago

2.8.63

11 months ago

2.8.62

11 months ago

2.8.61

11 months ago

2.8.67

11 months ago

2.8.66

11 months ago

2.8.65

11 months ago

2.8.64

11 months ago

2.8.69

11 months ago

2.8.68

11 months ago

2.8.70

11 months ago

2.8.71

11 months ago

2.4.39

12 months ago

2.4.38

12 months ago

2.6.55

11 months ago

2.6.56

11 months ago

2.6.57

11 months ago

2.6.58

11 months ago

1.3.17

1 year ago

1.3.18

1 year ago

2.6.53

11 months ago

2.6.54

11 months ago

1.3.19

1 year ago

3.15.121

9 months ago

3.15.120

9 months ago

2.10.82

10 months ago

2.10.83

10 months ago

2.10.84

10 months ago

2.10.85

10 months ago

2.10.86

10 months ago

2.10.87

10 months ago

2.10.88

10 months ago

2.10.89

10 months ago

2.4.47

12 months ago

1.3.20

1 year ago

2.4.46

12 months ago

1.3.21

1 year ago

2.4.43

12 months ago

2.4.42

12 months ago

2.4.45

12 months ago

1.3.22

1 year ago

2.4.44

12 months ago

1.3.23

1 year ago

2.4.41

12 months ago

2.4.40

12 months ago

3.14.114

9 months ago

3.14.111

9 months ago

3.14.110

9 months ago

3.14.113

9 months ago

3.14.112

9 months ago

2.9.71

11 months ago

2.9.74

11 months ago

2.9.75

11 months ago

2.9.72

11 months ago

2.9.73

11 months ago

3.11.99

10 months ago

3.14.104

9 months ago

3.14.106

9 months ago

3.14.105

9 months ago

2.9.78

11 months ago

2.9.79

10 months ago

2.9.76

11 months ago

2.9.77

11 months ago

3.14.108

9 months ago

2.7.59

11 months ago

3.14.107

9 months ago

2.7.58

11 months ago

3.14.109

9 months ago

1.1.14

1 year ago

1.1.12

1 year ago

1.0.11

1 year ago

1.1.11

1 year ago

1.1.13

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago