Skip to content

Commit

Permalink
improved restore UX: added usage examples and fixed syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
lirazsiri committed Oct 24, 2013
1 parent 4930edb commit 179c2c4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cmd_restore.py
Expand Up @@ -107,6 +107,20 @@
<option-name> <value>
Examples:
# restore Hub backup id 1
tklbam-restore 1
# restore Hub backup id 1 in two steps, first the download, then the application
tklbam-restore --raw-download=/tmp/mybackup 1
tklbam-restore /tmp/mybackup
# restore from Duplicity archives at manual backup address
tklbam-restore --keyfile=mybackup.escrow --address=file:///mnt/backups/mybackup
# simulate restoring of Hub backup id 1. Exclude /root path and mysql customers db
tklbam-restore --simulate --limits="-/root -mysql:customers" 1
"""

import os
Expand Down Expand Up @@ -242,7 +256,8 @@ def usage(e=None):
if e:
print >> stdout, "error: " + str(e)

print >> stdout, "Syntax: %s [ -options ] [ <hub-backup> ]" % sys.argv[0]
print >> stdout, "Usage: %s [ -options ] <hub-backup>" % sys.argv[0]
print >> stdout, "Usage: %s [ -options ] --address=<address> --keyfile=path/to/key.escrow" % sys.argv[0]

tpl = Template(__doc__.strip())
conf = Conf()
Expand Down

0 comments on commit 179c2c4

Please sign in to comment.