source: box/trunk/bin/bbackupquery/documentation.txt @ 2754

Revision 2754, 5.4 KB checked in by chris, 20 months ago (diff)

Allow restoring directories with a single argument, using the remote name
as the local destination name also.

  • 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 in local time
42              (and attr mod time if has the object has attributes, ~ separated)
43        -T -- show file modification time in GMT
44        -a -- show updated attribute instead of file modification time
45        -s -- show file size in blocks used on server
46              (only very approximate indication of size locally)
47        -h -- show file attributes hash
48
49ls can be used as an alias.
50<
51
52> ls
53
54        Alias for 'list'. Type 'help list' for options.
55<
56
57> cd [options] <directory-name>
58
59        Change directory
60       
61        -d -- consider deleted directories for traversal
62        -o -- consider old versions of directories for traversal
63                (this option should never be useful in a correctly formed store)
64<
65
66> pwd
67
68        Print current directory, always root relative.
69<
70
71> lcd <local-directory-name>
72
73        Change local directory.
74       
75        Type "sh ls" to list the contents.
76<
77
78> sh <shell command>
79
80        All of the parameters after the "sh" are run as a shell command.
81       
82        For example, to list the contents of the location directory, type "sh ls"
83<
84
85> get <object-filename> [<local-filename>]
86get -i <object-id> <local-filename>
87
88        Gets a file from the store. Object is specified as the filename within
89        the current directory, and local filename is optional. Ignores old and
90        deleted files when searching the directory for the file to retrieve.
91       
92        To get an old or deleted file, use the -i option and select the object
93        as a hex object ID (first column in listing). The local filename must
94        be specified.
95<
96
97> compare -a
98compare -l <location-name>
99compare <store-dir-name> <local-dir-name>
100
101        Compares the (current) data on the store with the data on the disc.
102        All the data will be downloaded -- this is potentially a very long
103        operation.
104       
105        -a -- compare all locations
106        -l -- compare one backup location as specified in the configuration file.
107        -c -- set return code
108        -q -- quick compare. Only checks file contents against checksums,
109                        doesn't do a full download
110        -A -- ignore attribute differences
111        -E -- ignore exclusion settings
112       
113        Comparing with the root directory is an error, use -a option instead.
114
115        If -c is set, then the return code (if quit is the next command) will be
116                1       Comparison was exact
117                2       Differences were found
118                3       An error occured
119        This can be used for automated tests.
120<
121
122> restore [-drif] <directory-name> [<local-directory-name>]
123
124        Restores a directory to the local disc. The local directory specified
125        must not exist (unless a previous restore is being restarted). If the
126        local directory is omitted, the default is to restore to the same
127        directory name and path, relative to the current local directory,
128        as set with the "lcd" command.
129
130        The root cannot be restored -- restore locations individually.
131
132        -d -- restore a deleted directory or deleted files inside
133        -r -- resume an interrupted restoration
134        -i -- directory name is actually an ID
135        -f -- force restore to continue if errors are encountered
136
137        If a restore operation is interrupted for any reason, it can be restarted
138        using the -r switch. Restore progress information is saved in a file at
139        regular intervals during the restore operation to allow restarts.
140<
141
142> getobject <object-id> <local-filename>
143
144        Gets the object specified by the object id (in hex) and stores the raw
145        contents in the local file specified.
146
147        This is only useful for debugging as it does not decode files from the
148        stored format, which is encrypted and compressed.
149<
150
151> usage [-m]
152
153        Show space used on the server for this account.
154
155        -m -- display the output in machine-readable form
156
157        Used: Total amount of space used on the server.
158        Old files: Space used by old files
159        Deleted files: Space used by deleted files
160        Directories: Space used by the directory structure.
161       
162        When Used exceeds the soft limit, the server will start to remove old and
163        deleted files until the usage drops below the soft limit.
164       
165        After a while, you would expect to see the usage stay at just below the
166        soft limit. You only need more space if the space used by old and deleted
167        files is near zero.
168<
169
170> undelete <directory-name>
171undelete -i <object-id>
172
173        Removes the deleted flag from the specified directory name (in the
174        current directory) or hex object ID. Be careful not to use this
175        command where a directory already exists with the same name which is
176        not marked as deleted.
177<
178
179> delete <file-name>
180
181        Sets the deleted flag on the specified file name (in the current
182        directory, or with a relative path).
183<
184
185> quit
186
187        End session and exit.
188<
189
190
Note: See TracBrowser for help on using the repository browser.