Command line differential backup tool made by 100% shell script.
It's a differential backup tool, which have ritch feature: backup, fullbackup, search, grep, diff, restore, clean up.
- Ritch feature
- use filesystem itself (when you want to complement the function, you can use shell command very easily, you can easily transfer data to other pc or file system)
- Since it is compressed and save, saves data (gzip type)
- It form golden combination with git (when your project is too security sensitive to use git, file transfer other branch, and you have half-finished but important edits)
- Support Ubuntu20.04+
git clone https://github.com/kitamura-take/difbk.git ~/.difbk
cd ~/.difbk/install
bash install.sh l
- delete $HOME/.difbk directory
- same as installation.
It mean diffrencial backup
- type bellow command
difbk bk -d "{backup description}"
- If
label stamp
exist, select and type esc
-
back up option
option set value comment -d
string backup'e description -dn
no no set backup'e description -mklabel
string label stamp attached to the beginning of the description (ex label -> [label] ~ ) -rmlabel
string remove registerd label -lslabel
no list registerd labels -ln
no when backup, not add label stamp
It mean confirm status
- type bellow command
difbk st (target mergelist number (reffrer lrs merge list num or target file)|merge list path)
remove recent backup
- type bellow command
difbk reset
-
lrs option
option set value comment -s
no without comfirm, remove it
difbk
management backup generation by backup files's text file(in fact commpressed into gz). Here list backup's list text files. this subcommand is base command in difbk
. This is used for sch
, rs
and diff
, etc. When add no -full
option, display recent 30 merge file path
- type bellow command
difbk lrs -e
-
lrs option
option set value comment -e
no display every backup file -d
string description's include
filter string-de
string description's or
filter string-dv
string description's exclude
filter label-full
no full merge list display
difbk
can search path or file contents. It's freqently use feature, and strong one at the same time.
- type bellow command
difbk sch {search path word1} {search path word2} {search path word3} ...
- It's
and
search.
-
sch option
option set value comment -e
string or
search-v
string exclude
search-d
string description's include
filter string-de
string description's or
filter string-dv
string description's exclude
filter label-da
datetime string (YYYY/MM/DD/hhmm) delete after datetme -db
datetime string (YYYY/MM/DD/hhmm) delete before datetme -j
int generation number (when difbk lrs -e
, display in left brackets)
- type bellow command
difbk sch -c {search path word}
-
sch -c option
option set value comment -d
string description's include
filter string-de
string description's or
filter string-dv
string description's exclude
filter label-da
datetime string (YYYY/MM/DD/hhmm) delete after datetme -db
datetime string (YYYY/MM/DD/hhmm) delete before datetme -j
int every generation number (when difbk lrs -e
, display in left brackets)
- type bellow command
difbk diff (target mergelist number (reffrer lrs merge list num or target file)|merge list path)
- type bellow command
difbk diff { blank (current direcotry diff) | generation number or backup list file path or backuped file path}
-
diff option
option set value comment -e
int every generation search on (default daily diff) -de
string description's or
filter string-dv
string description's exclude
filter label-da
datetime string (YYYY/MM/DD/hhmm) delete after datetme -db
datetime string (YYYY/MM/DD/hhmm) delete before datetme
This is generally called restore
- type bellow command
difbk rs {backup list file path} {destination directory} (grep path from backup list)
This restore only one buckup file. In a nutshell, merge
or copy
- type bellow command
difbk rs {backup one file path}
-
above command mean
merge
-
merge option
option set value comment -c
no not merge
butcopy
- type bellow command
difbk rbk [merge list path or order num (number in left brackets when type difkb lrs -e )]
difbk
mainly use backup list file. Threfore, this have sub command that varidate backup list file.
- type bellow command
difbk clean -vl
- latest backup file check and if finding miss, correct.
Although difbk
compress file and save one, Data can be bloated with long use. when so , delete spedify generation, and litghten the buckup.
- type bellow command
difbk clean -dddd {generation number you wont to leaves last}
generation number
is larger three.
When you want to merge backups and you want to rename project directory, difbk
can do.
- type bellow command
difbk mrg -alt {project directory after renamd} {backup root directory after renamed}
-
backup root project directory
meanold_{project directory name}
in the same hierarchy as the project directory -
{project directory after renamd}
can use-
for current project directory name and_
for deleting current project directory name -
{backup root directory after renamed}
can use-
for current backup root project directory name and_
for deleting current backup root project directory name -
merge option
option set value comment -dest
string destination directory full path for move