# Back up the old version.
version=`ovsdb_tool db-version "$DB_FILE"`
cksum=`ovsdb_tool db-cksum "$DB_FILE" | awk '{print $1}'`
- cp "$DB_FILE" "$DB_FILE.backup$version-$cksum"
+ backup=$DB_FILE.backup$version-$cksum
+ action "Backing up database to $backup" cp "$DB_FILE" "$backup"
# Compact database. This is important if the old schema did not enable
# garbage collection (i.e. if it did not have any tables with "isRoot":
# does) would cause the record to be dropped by the first transaction,
# then the second transaction would cause a referential integrity
# failure (for a strong reference).
- ovsdb_tool compact "$DB_FILE"
+ action "Compacting database" ovsdb_tool compact "$DB_FILE"
# Upgrade or downgrade schema.
- ovsdb_tool convert "$DB_FILE" "$DB_SCHEMA"
+ action "Converting database schema" ovsdb_tool convert "$DB_FILE" "$DB_SCHEMA"
fi
}