From 516d7492d827f7dafa229d65a0d0a8d982cfdf43 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@nicira.com>
Date: Thu, 7 Jul 2011 13:19:31 -0700
Subject: [PATCH] ovs-bugtool: Include conf.db backups in bugtool output.

When an upgrade or downgrade fails due to OVSDB issues, it is useful to
have the old versions of the database available.
---
 utilities/bugtool/automake.mk                 |  1 +
 .../plugins/system-logs/openvswitch.xml       | 21 +++++++++++++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 utilities/bugtool/plugins/system-logs/openvswitch.xml

diff --git a/utilities/bugtool/automake.mk b/utilities/bugtool/automake.mk
index 1d4f94e10..7d8d136e4 100644
--- a/utilities/bugtool/automake.mk
+++ b/utilities/bugtool/automake.mk
@@ -6,6 +6,7 @@ bugtool_plugins = \
 	utilities/bugtool/plugins/kernel-info/openvswitch.xml \
 	utilities/bugtool/plugins/network-status/openvswitch.xml \
 	utilities/bugtool/plugins/system-configuration.xml \
+	utilities/bugtool/plugins/system-logs/openvswitch.xml \
 	utilities/bugtool/plugins/system-configuration/openvswitch.xml
 
 bugtool_scripts = \
diff --git a/utilities/bugtool/plugins/system-logs/openvswitch.xml b/utilities/bugtool/plugins/system-logs/openvswitch.xml
new file mode 100644
index 000000000..a54e897bd
--- /dev/null
+++ b/utilities/bugtool/plugins/system-logs/openvswitch.xml
@@ -0,0 +1,21 @@
+<!--
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of version 2.1 of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+
+ Copyright (C) 2011 Nicira Networks.
+-->
+
+<collect>
+  <directory label="ovsdb-backups" pattern=".*/conf.db.backup[0-9][^/]*$">/etc/openvswitch</directory>
+</collect>
-- 
2.47.0