root/box/chris/merge/bin/bbackupquery/documentation.txt @ 1188

Revision 1188, 4.6 KB (checked in by chris, 4 years ago)

Document that restore -d can be used to restore deleted files in any
directory, deleted or not. (refs #3)

  • Property svn:eol-style set to native
Line 
1
2bbackupquery utility -- examine store, compare files, restore, etc.
3
4This file has markers for automatic help generation script -- '>' marks a start of a command/help topic,
5and '<' marks the end of a section.
6
7Command line:
8=============
9
10> bbackupquery [-q] [-c configfile] [commands ...]
11
12        -q -- quiet, no information prompts
13        -c -- specify another bbackupd configuation file
14
15The commands following the options are executed, then (if there was no quit
16command) an interactive mode is entered.
17
18If a command contains a space, enclose it in quotes. Example
19
20        bbackupquery "list testdir1" quit
21
22to list the contents of testdir1, and then exit without interactive mode.
23<
24
25Commands:
26=========
27
28All directory names relative to a "current" directory, or from root if they
29start with '/'. The initial directory is always the root directory.
30
31
32> list [options] [directory-name]
33
34        List contents of current directory, or specified directory.
35       
36        -r -- recursively list all files
37        -d -- list deleted files/directories
38        -o -- list old versions of files/directories
39        -I -- don't display object ID
40        -F -- don't display flags
41        -t -- show file modification time
42                        (and attr mod time if has the object has attributes, ~ separated)
43        -s -- show file size in blocks used on server
44                        (only very approximate indication of size locally)
45
46ls can be used as an alias.
47<
48
49> ls
50
51        Alias for 'list'. Type 'help list' for options.
52<
53
54> cd [options] <directory-name>
55
56        Change directory
57       
58        -d -- consider deleted directories for traversal
59        -o -- consider old versions of directories for traversal
60                (this option should never be useful in a correctly formed store)
61<
62
63> pwd
64
65        Print current directory, always root relative.
66<
67
68> lcd <local-directory-name>
69
70        Change local directory.
71       
72        Type "sh ls" to list the contents.
73<
74
75> sh <shell command>
76
77        All of the parameters after the "sh" are run as a shell command.
78       
79        For example, to list the contents of the location directory, type "sh ls"
80<
81
82> get <object-filename> [<local-filename>]
83get -i <object-id> <local-filename>
84
85        Gets a file from the store. Object is specified as the filename within
86        the current directory, and local filename is optional. Ignores old and
87        deleted files when searching the directory for the file to retrieve.
88       
89        To get an old or deleted file, use the -i option and select the object
90        as a hex object ID (first column in listing). The local filename must
91        be specified.
92<
93
94> compare -a
95compare -l <location-name>
96compare <store-dir-name> <local-dir-name>
97
98        Compares the (current) data on the store with the data on the disc.
99        All the data will be downloaded -- this is potentially a very long
100        operation.
101       
102        -a -- compare all locations
103        -l -- compare one backup location as specified in the configuration file.
104        -c -- set return code
105        -q -- quick compare. Only checks file contents against checksums,
106                        doesn't do a full download
107        -A -- ignore attribute differences
108        -E -- ignore exclusion settings
109       
110        Comparing with the root directory is an error, use -a option instead.
111
112        If -c is set, then the return code (if quit is the next command) will be
113                1       Comparison was exact
114                2       Differences were found
115                3       An error occured
116        This can be used for automated tests.
117<
118
119> restore [-d] [-r] [-i] <directory-name> <local-directory-name>
120
121        Restores a directory to the local disc. The local directory specified
122        must not exist (unless a previous restore is being restarted).
123
124        The root cannot be restored -- restore locations individually.
125
126        -d -- restore a deleted directory or deleted files inside
127        -r -- resume an interrupted restoration
128        -i -- directory name is actually an ID
129
130        If a restore operation is interrupted for any reason, it can be restarted
131        using the -r switch. Restore progress information is saved in a file at
132        regular intervals during the restore operation to allow restarts.
133<
134
135> getobject <object-id> <local-filename>
136
137        Gets the object specified by the object id (in hex) and stores the raw
138        contents in the local file specified.
139
140        This is only useful for debugging as it does not decode files from the
141        stored format, which is encrypted and compressed.
142<
143
144> usage
145
146        Show space used on the server for this account.
147
148        Used: Total amount of space used on the server.
149        Old files: Space used by old files
150        Deleted files: Space used by deleted files
151        Directories: Space used by the directory structure.
152       
153        When Used exceeds the soft limit, the server will start to remove old and
154        deleted files until the usage drops below the soft limit.
155       
156        After a while, you would expect to see the usage stay at just below the
157        soft limit. You only need more space if the space used by old and deleted
158        files is near zero.
159<
160
161> quit
162
163        End session and exit.
164<
165
166
Note: See TracBrowser for help on using the browser.