Skip to content

garulovilla/bak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bak

Backup files and folders

Install globally

cd bak
npm link

Insert in path environment

%USERPROFILE%\AppData\Roaming\npm\

Commands

Create

Create a new configuration file

bak create <config_file>

Add

Add a file or folder to a configuration file

bak add <file_folder> <config_file>

Run

Run a configuration file

bak run <config_file>

Configuration file

{
  // Directory where the backup will be made (required)
  "to": "",

  // Array with the files and folders to backup (optional)
  "backup": [
    {
      // Name of backup (optional)
      "name": "",

      // Description of backup (optional)
      "description": "",

      // Path to file or folder to backup (required)
      // This can be a string or a array of strings
      "from": "",

      // Type of compression: "", "7z", "zip" (optional, default="")
      "compression": "",

      // A subfolder is created inside the backup folder with this name
      // and it is where the content will be stored (optional, default=current backup path)
      "subfolder": "",

      // When a folder is specified in from path, is posible filter
      // the files/folder inside the folder with this option
      // it is possible set multiple filters separated with ";" (optional, default="" <no filter>)
      "match": "",

      // Rename the file o folder (optional, default=current name of file/folder)
      // Note: Be careful when the path is an array and no compression is needed
      // you need always set the "/o" patter to differentiate files and folder
      // patterns that can be used:
      // /s - Timestamp => yyyyMMddhhmmss
      // /d - Date => yyyyMMdd
      // /t - Time => hhmmss
      // /o - Original name of file/folder
      // /n - Name of element
      // /b - Subfolder of element
      "rename": "",

      // Only keep "n" number of backups. This is useful when you have
      // a rename pattern like "/d_/o" and you want to delete previous backups
      // to only keep "n" backups (optional, default=0 <means no delete any backup>)
      // Note: This option only takes effect if the "rename" property
      // is specified in the element
      "keep": 3,

      // Backup this item? (optional, default=true)
      "active": true,

      // Copy first to temp folder (optional, default=false)
      // This is util when the compression is used and the files/folders
      // are in use
      "temp": false
    }
  ]
}

About

Backup files and folders

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors