-
Notifications
You must be signed in to change notification settings - Fork 1
/
Howto
98 lines (79 loc) · 2.36 KB
/
Howto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Vbak commands available:
help add files list
update checkout/co remove clear
* vbak help - Online help *
$ vbak help
$ vbak help -t
* vbak add - Backup your files *
$ vbak add .emacs .emacs.d/ this\ is\ a\ file.txt
Add .emacs
/home/vvoody/.emacs
home-vvoody-.emacs
...
# Tag the files
$ cd ~/.opera
$ vbak -t opera contacts.adr js/ menu/vvoodysMenu.ini speeddial.ini
Attention: We will use these 6 files and 1 directory in the future example.
* vbak files/list - Show what you have backuped *
$ vbak files [-t TAGNAME]
/home/vvoody/.emacs
/home/vvoody/.emacs.d
/home/vvoody/this is a file.txt
/home/vvoody/.opera/contacts.adr
/home/vvoody/.opera/js
/home/vvoody/.opera/menu/vvoodysMenu.ini
/home/vvoody/.opera/speeddial.ini
$ vbak files -t opera
/home/vvoody/.opera/contacts.adr
/home/vvoody/.opera/js
/home/vvoody/.opera/menu/vvoodysMenu.ini
/home/vvoody/.opera/speeddial.ini
# If the backuped file is not in the repository, vbak will notice you.
# Then use vbak update to backup it again.
$ vbak list [-t TAGNAME]
home-vvoody-.emacs
home-vvoody-.emacs.d
home-vvoody-this is a file.txt
home-vvoody-.opera-contact.adr
home-vvoody-.opera-js
home-vvoody-.opera-menu-vvoodysMenu.ini *MISSED!*
home-vvoody-.opera-speeddial.ini
* vbak update - Update files *
# If the orignal file is newer than its backuped file, then update.
# If the backuped file is missed, vbak will backup it again.
$ remove .vbak/home-vvoody-.opera-menu-vvoodysMenu.ini
$ vbak update
/home/vvoody/.opera/menu/vvoodysMenu.ini *UPDATED!*
# Update one group of files
$ vbak update -t opera
...
# If the file to backup is not there, vbak will notice you.
$ remove ~/.emacs
$ vbak update
$ /home/vvoody/.emacs "*Disappeared!*"
* vbak checkout/co - Checkout config file *
# Recover your config files quickly
$ INSTALL OPERA
...
$ cd .opera
$ vbak co -t opera
4 file(s) checkouted!
$ opera &
* vbak remove - Unbackup files *
$ vbak remove -t opera
$ vbak files
home-vvoody-.emacs
home-vvoody-.emacs.d
home-vvoody-this is a file.txt
$ vbak remove .emacs
$ vbak files
home-vvoody-.emacs.d
home-vvoody-this is a file.txt
$
* vbak clear - Clean up the backup repository *
$ vbak clear
We will remove all backuped files and clear up the file.list
Are you sure? y
$ ls -a .vbak
. ..
$