backup-simple

0.4.1 • Public • Published

backup-simple


Backup rotation daily, weekly, monthly for small file footprint.

Install


npm install backup-simple

Description


The back up looks for an attached memory stick, creates a backup directory (backup) then copies the files three times to a daily, weekly, and monthly folder.

The files are over written so that there are

  • 7 daily folders
  • 5 weekly folders
  • One monthly folder for month in the year.

So in affect current week each day, current month each week, and one per month for ever.

Sample Folders


On March 1 2018 the following folders are created:

  • /backup/2018_03
  • /backup/2018_03_week01
  • /backup/2018_03_01_thursday

On March 2 2018

  • /backup/2018_03 (over written)
  • /backup/2018_03_week01 (over written)
  • /backup/2018_03_01_thursday (unchanged)
  • /backup/2018_03_02_friday (new)

One week later March 8 2018

  • /backup/2018_03 (over written)
  • /backup/2018_03_week01
  • /backup/2018_03_week02 (new)
  • /backup/2018_03_08_thursday (new)
  • /backup/2018_03_02_friday
  • /backup/2018_03_03_saturday
  • /backup/2018_03_04_sunday
  • /backup/2018_03_05_monday
  • /backup/2018_03_06_tuesday
  • /backup/2018_03_07_wendsday

Sample Code


const { runBackUp } = require("backup-simple");
runBackUp("./test/testFiles/source/").then(function(complete) {
    console.log(complete);
});

Readme

Keywords

Package Sidebar

Install

npm i backup-simple

Weekly Downloads

0

Version

0.4.1

License

ISC

Unpacked Size

63.2 kB

Total Files

26

Last publish

Collaborators

  • vmartinez