52a11834ef
This patch fixes: doc/source/contributor/testing.rst:281: D000 Explicit markup ends without a blank line; unexpected unindent. doc/source/user/test/example.rst:28: D001 Line too long doc/source/admin/maintenance-tasks.rst:8: D000 Title level inconsistent: doc/source/admin/maintenance-tasks.rst:22: D000 Title level inconsistent: doc/source/admin/troubleshooting.rst:630: D001 Line too long doc/source/admin/troubleshooting.rst:650: D001 Line too long doc/source/admin/maintenance-tasks/inventory-backups.rst:11: D001 Line too long For consistency between maintenance-tasks/ files, they now all have the same markup hierarchy. Depends-On: https://review.openstack.org/567804 Change-Id: Id1cf9cb45543daa7c39d5141d8dc5827a76c6413
1.2 KiB
1.2 KiB
Prune Inventory Backup Archive
The inventory backup archive will require maintenance over a long enough period of time.
Bulk pruning
It's possible to do mass pruning of the inventory backup. The following example will prune all but the last 15 inventories from the running archive.
ARCHIVE="/etc/openstack_deploy/backup_openstack_inventory.tar"
tar -tvf ${ARCHIVE} | \
head -n -15 | awk '{print $6}' | \
xargs -n 1 tar -vf ${ARCHIVE} --delete
Selective Pruning
To prune the inventory archive selectively first identify the files you wish to remove by listing them out.
tar -tvf /etc/openstack_deploy/backup_openstack_inventory.tar
-rw-r--r-- root/root 110096 2018-05-03 10:11 openstack_inventory.json-20180503_151147.json
-rw-r--r-- root/root 110090 2018-05-03 10:11 openstack_inventory.json-20180503_151205.json
-rw-r--r-- root/root 110098 2018-05-03 10:12 openstack_inventory.json-20180503_151217.json
Now delete the targeted inventory archive.
tar -vf /etc/openstack_deploy/backup_openstack_inventory.tar --delete openstack_inventory.json-20180503_151205.json