Add 'fullbackup' to bmgr's usage statement

Also make it handle the list of packages to be backed up as a single
multiple-app argument to fullTransportBackup() rather than N calls
each backing up one app.

Change-Id: I9fe4d5caca54fafef70ffe9af4c26e3941dc5d26
This commit is contained in:
Christopher Tate
2014-06-24 16:28:48 -07:00
parent 7218e9c6be
commit ab225b301b

View File

@@ -175,10 +175,13 @@ public final class Bmgr {
System.out.println("Performing full transport backup");
String pkg;
ArrayList<String> allPkgs = new ArrayList<String>();
while ((pkg = nextArg()) != null) {
System.out.println(" Package " + pkg + " ...");
allPkgs.add(pkg);
}
if (allPkgs.size() > 0) {
try {
mBmgr.fullTransportBackup(new String[] { pkg });
mBmgr.fullTransportBackup(allPkgs.toArray(new String[allPkgs.size()]));
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(BMGR_NOT_RUNNING_ERR);
@@ -474,6 +477,7 @@ public final class Bmgr {
System.err.println(" bmgr restore PACKAGE");
System.err.println(" bmgr run");
System.err.println(" bmgr wipe TRANSPORT PACKAGE");
System.err.println(" bmgr fullbackup PACKAGE...");
System.err.println("");
System.err.println("The 'backup' command schedules a backup pass for the named package.");
System.err.println("Note that the backup pass will effectively be a no-op if the package");
@@ -489,11 +493,11 @@ public final class Bmgr {
System.err.println("");
System.err.println("The 'list transports' command reports the names of the backup transports");
System.err.println("currently available on the device. These names can be passed as arguments");
System.err.println("to the 'transport' and 'wipe' commands. The currently selected transport");
System.err.println("to the 'transport' and 'wipe' commands. The currently active transport");
System.err.println("is indicated with a '*' character.");
System.err.println("");
System.err.println("The 'list sets' command reports the token and name of each restore set");
System.err.println("available to the device via the current transport.");
System.err.println("available to the device via the currently active transport.");
System.err.println("");
System.err.println("The 'transport' command designates the named transport as the currently");
System.err.println("active one. This setting is persistent across reboots.");
@@ -521,5 +525,8 @@ public final class Bmgr {
System.err.println("erased from the given transport's storage. The next backup operation");
System.err.println("that the given application performs will rewrite its entire data set.");
System.err.println("Transport names to use here are those reported by 'list transports'.");
System.err.println("");
System.err.println("The 'fullbackup' command induces a full-data stream backup for one or more");
System.err.println("packages. The data is sent via the currently active transport.");
}
}