-
Notifications
You must be signed in to change notification settings - Fork 35
/
operations-maintenance-database_maintenance.xml
35 lines (35 loc) · 1.47 KB
/
operations-maintenance-database_maintenance.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0"?>
<?xml-stylesheet href="urn:x-suse:xslt:profiling:docbook51-profile.xsl"
type="text/xml"
title="Profiling step"?>
<!DOCTYPE section [
<!ENTITY % entities SYSTEM "entity-decl.ent"> %entities;
]>
<section xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="database-maintenance">
<title>Periodic OpenStack Maintenance Tasks</title>
<para>
Heat-manage helps manage Heat specific database operations. The associated
database should be periodically purged to save space. The following should
be setup as a cron job on the servers where the heat service is running at
<literal>/etc/cron.weekly/local-cleanup-heat</literal>
with the following content:
</para>
<screen>
#!/bin/bash
su heat -s /bin/bash -c "/usr/bin/heat-manage purge_deleted -g days 14" || :
</screen>
<para>
nova-manage db archive_deleted_rows command will move deleted rows
from production tables to shadow tables. Including
<literal>--until-complete</literal> will make the command run continuously
until all deleted rows are archived. It is recommended to setup this task
as <literal>/etc/cron.weekly/local-cleanup-nova</literal>
on the servers where the nova service is running, with the
following content:
</para>
<screen>
#!/bin/bash
su nova -s /bin/bash -c "/usr/bin/nova-manage db archive_deleted_rows --until-complete" || :
</screen>
</section>