<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>cavaliba.com – Operations</title>
    <link>http://localhost:1313/docs/80operation/</link>
    <description>Recent content in Operations on cavaliba.com</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
	  <atom:link href="http://localhost:1313/docs/80operation/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin Tools</title>
      <link>http://localhost:1313/docs/80operation/admintools/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>http://localhost:1313/docs/80operation/admintools/</guid>
      <description>
        
        
        &lt;h2&gt;Overview&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;overview&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#overview&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cavaliba provides a built-in Admin Tools interface for system administrators to perform critical maintenance and operational tasks. These tools are accessible from the administration dashboard and require the &lt;code&gt;p_admintools&lt;/code&gt; permission.&lt;/p&gt;
&lt;p&gt;Access the Admin Tools with the &lt;code&gt;admintool&lt;/code&gt; sidebar button or at  &lt;code&gt;/private/admintools/&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Permissions&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;permissions&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#permissions&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;All Admin Tools require the &lt;code&gt;p_admintools&lt;/code&gt; permission. This permission should only be granted to trusted system administrators. It is available to all &lt;code&gt;admin&lt;/code&gt; users.&lt;/p&gt;
&lt;p&gt;To check and manage admin permissions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to &lt;code&gt;Administration &amp;gt; Roles&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Grant the &lt;code&gt;p_admintools&lt;/code&gt; permission to selected roles&lt;/li&gt;
&lt;li&gt;Map individual users and/or group to selected roles&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Available Tools&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;available-tools&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#available-tools&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3&gt;Counters (Schema Counters &amp;amp; BigSet Update)&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;counters-schema-counters--bigset-update&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#counters-schema-counters--bigset-update&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Update schema counters and bigset status for all schemas&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After bulk data operations (imports, migrations)&lt;/li&gt;
&lt;li&gt;When schema statistics appear out of sync&lt;/li&gt;
&lt;li&gt;During routine maintenance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;: Click the &amp;ldquo;Counters&amp;rdquo; button&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recalculates instance count for each schema&lt;/li&gt;
&lt;li&gt;Updates bigset cache status&lt;/li&gt;
&lt;li&gt;Refreshes schema statistics used by the UI for pagination&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Negligible. Safe to use.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative&lt;/strong&gt;: this task is included in the automatic daily housekeeping.&lt;/p&gt;
&lt;h3&gt;EAV Refresh&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;eav-refresh&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#eav-refresh&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Rebuild the Entity-Attribute-Value (EAV) cache for improved query and filtering responses&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When out of sync response / missing new entries in filtering&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;: Click the &amp;ldquo;EAV Refresh&amp;rdquo; button&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rebuilds the complete EAV cache from the database&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Long-running task. System performance may be temporarily reduced. Cache will be fully rebuilt after completion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This is an async task that runs in the background. Progress can be monitored in the application logs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative&lt;/strong&gt;: this task is included in the automatic daily housekeeping.&lt;/p&gt;
&lt;h3&gt;EAV Purge&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;eav-purge&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#eav-purge&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Clear the EAV cache to remove orphan entries and improve queries and filtering&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When cache may be corrupted&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;: Click the &amp;ldquo;EAV Purge&amp;rdquo; button&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recreates all cache entries from main Database&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Long-running task. System performance may be temporarily reduced. Cache will be fully rebuilt after completion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This is an async task that runs in the background. Progress can be monitored in the application logs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative&lt;/strong&gt;: this task is included in the automatic daily housekeeping.&lt;/p&gt;
&lt;h3&gt;Data Revisions&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;data-revisions&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#data-revisions&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: View data revision tracking history&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Audit data changes and modifications&lt;/li&gt;
&lt;li&gt;Track who changed what and when&lt;/li&gt;
&lt;li&gt;Investigate data mutation issues&lt;/li&gt;
&lt;li&gt;Review revision history&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;: Click the &amp;ldquo;Revision&amp;rdquo; button&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;View all recorded data revisions (ordered by most recent first)&lt;/li&gt;
&lt;li&gt;Pagination support (1000 items per page by default)&lt;/li&gt;
&lt;li&gt;Columns: ID, Date, Schema, Instance, Action, User&lt;/li&gt;
&lt;li&gt;Filter by custom page size using &lt;code&gt;?size=500&lt;/code&gt; parameter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;URL Parameters&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;page&lt;/code&gt;: Page number (default: 1)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;size&lt;/code&gt;: Items per page (default: 1000, max: 10000)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&#34;hextra-code-block hx-relative hx-mt-6 first:hx-mt-0 hx-group/code&#34;&gt;

&lt;div&gt;&lt;pre&gt;&lt;code&gt;/private/admintools/revision/?page=1&amp;amp;size=500
/private/admintools/revision/?page=2&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;hextra-code-copy-btn-container hx-opacity-0 hx-transition group-hover/code:hx-opacity-100 hx-flex hx-gap-1 hx-absolute hx-m-[11px] hx-right-0 hx-top-0&#34;&gt;
  &lt;button
    class=&#34;hextra-code-copy-btn hx-group/copybtn hx-transition-all active:hx-opacity-50 hx-bg-primary-700/5 hx-border hx-border-black/5 hx-text-gray-600 hover:hx-text-gray-900 hx-rounded-md hx-p-1.5 dark:hx-bg-primary-300/10 dark:hx-border-white/10 dark:hx-text-gray-400 dark:hover:hx-text-gray-50&#34;
    title=&#34;Copy code&#34;
  &gt;
    &lt;div class=&#34;copy-icon group-[.copied]/copybtn:hx-hidden hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
    &lt;div class=&#34;success-icon hx-hidden group-[.copied]/copybtn:hx-block hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;DB Reset (Factory Reset)&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;db-reset-factory-reset&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#db-reset-factory-reset&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Reset the database to its initial (empty) state&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;⚠️ DANGER&lt;/strong&gt;: This action is irreversible and deletes ALL data&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Only when explicitly needed&lt;/li&gt;
&lt;li&gt;Development/testing environments&lt;/li&gt;
&lt;li&gt;Fresh system initialization&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deletes all schemas (DataClass)&lt;/li&gt;
&lt;li&gt;Deletes all schema fields (DataSchema)&lt;/li&gt;
&lt;li&gt;Deletes all data instances&lt;/li&gt;
&lt;li&gt;Deletes all users and groups&lt;/li&gt;
&lt;li&gt;Deletes all configuration&lt;/li&gt;
&lt;li&gt;Resets the database to an empty state&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Command&lt;/strong&gt;: Click the &amp;ldquo;DB Reset&amp;rdquo; button and confirm in the modal dialog&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Complete data loss. All application data is permanently removed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recovery&lt;/strong&gt;: Only possible from database backups.&lt;/p&gt;
&lt;h2&gt;Command-line Alternatives&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;command-line-alternatives&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#command-line-alternatives&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Most admin tool operations have command-line equivalents accessible via the Django management command:&lt;/p&gt;
&lt;div class=&#34;hextra-code-block hx-relative hx-mt-6 first:hx-mt-0 hx-group/code&#34;&gt;

&lt;div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# EAV operations&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cavaliba cache --eav_refresh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cavaliba cache --eav_purge&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&#34;hextra-code-copy-btn-container hx-opacity-0 hx-transition group-hover/code:hx-opacity-100 hx-flex hx-gap-1 hx-absolute hx-m-[11px] hx-right-0 hx-top-0&#34;&gt;
  &lt;button
    class=&#34;hextra-code-copy-btn hx-group/copybtn hx-transition-all active:hx-opacity-50 hx-bg-primary-700/5 hx-border hx-border-black/5 hx-text-gray-600 hover:hx-text-gray-900 hx-rounded-md hx-p-1.5 dark:hx-bg-primary-300/10 dark:hx-border-white/10 dark:hx-text-gray-400 dark:hover:hx-text-gray-50&#34;
    title=&#34;Copy code&#34;
  &gt;
    &lt;div class=&#34;copy-icon group-[.copied]/copybtn:hx-hidden hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
    &lt;div class=&#34;success-icon hx-hidden group-[.copied]/copybtn:hx-block hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;

      </description>
    </item>
    
    <item>
      <title>Backup and restore</title>
      <link>http://localhost:1313/docs/80operation/backup_restore/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>http://localhost:1313/docs/80operation/backup_restore/</guid>
      <description>
        
        
        &lt;h2&gt;System &lt;code&gt;.env&lt;/code&gt; file&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;system-env-file&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#system-env-file&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;You must backup and protect the docker .env file in the cavaliba app directory.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd appdir/
$ cp .env /my/backup/dir/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It contains sensitive informations needed at startup time. It is created / modified during system setup and reconfig/&lt;/p&gt;
&lt;p&gt;Most needed data are encryption keys, and various credentials : DB, admin account, OIDC client secrets, etc.&lt;/p&gt;
&lt;p&gt;Restoration is a simple as copying back the file to the restored application folder.&lt;/p&gt;
&lt;h2&gt;Application configuration&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;application-configuration&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#application-configuration&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Most configuration items are managed from the application itself, and are stored in the database.&lt;/p&gt;
&lt;p&gt;You must backup this configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd appdir/                                              # or whatever your setup root dir is
$ cavaliba conf                                           # show current configuration
$ cavaliba conf --yaml &amp;gt; files/export/conf_backup.yaml    # load and replace in-DB configuration
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remember to setup &lt;code&gt;cavaliba&lt;/code&gt; as an alias to management commands as explained in the command-line (CLI) doc page.&lt;/p&gt;
&lt;p&gt;To restore the configuration on a new  deployement :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd appdir
$ cavaliba conf 
$ cavaliba conf --conf_file /files/export/conf_backup.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice the &lt;code&gt;/&lt;/code&gt; before files/ to ensure access from inside the containers.&lt;/p&gt;
&lt;h2&gt;Full database backup&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;full-database-backup&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#full-database-backup&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cavaliba provides &lt;code&gt;script/db_backup.sh &lt;/code&gt; to backup the full MySQL/MariaDB automatically.&lt;/p&gt;
&lt;p&gt;Setup:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1. create your backup dir
2. install standard zstd compression tool if missing
3. edit the script and set your choosen DB password (.env), BACKUPDIR
4. launch manually ./script/db_backup and check produced backup file in your Backupdir
3. add to crontab with provided example in the script

   25 */6 * * * /opt/cavaliba/script/db_backup.sh &amp;gt; /tmp/backup_db.log 2&amp;gt;&amp;amp;1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It creates a periodically rolling backup for 7 days.&lt;/p&gt;
&lt;p&gt;Restore:&lt;/p&gt;
&lt;p&gt;You can restore as a standard MariaDB / MySQL dump&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1. stop the application
2. drop / create cavaliba_db in your mysql server
3. zstdcat mybackup.zstd | mysql cavaliba_db
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Logicial Data backup&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;logicial-data-backup&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#logicial-data-backup&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cavaliba provides a simple data_export script:&lt;/p&gt;
&lt;div class=&#34;hextra-code-block hx-relative hx-mt-6 first:hx-mt-0 hx-group/code&#34;&gt;

&lt;div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# (c) cavaliba.com - DATA Export backup script&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# crontab example&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 45 */6 * * * /opt/cavaliba/script/data_backup.sh &amp;gt; /tmp/backup_data.log 2&amp;gt;&amp;amp;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;BACKUPDIR&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/opt/cavaliba/backup&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;root&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;PASSWORD&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;xxxxxxxxxxxxxxxxxxx&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date &lt;span class=&#34;s2&#34;&gt;&amp;#34;+%u&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date &lt;span class=&#34;s2&#34;&gt;&amp;#34;+%H&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DATE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date +%Y%m%d_%H:%M:%S&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_schema.zst&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DATE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; start dumping SCHEMA to &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; cavaliba_app python manage.py dumpdata --format json --indent &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; app_data.dataschema --natural-primary --natural-foreign &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; zstd &amp;gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DATE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date +%Y%m%d_%H:%M:%S&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_classname.zst&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DATE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; start dumping CLASS to &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; cavaliba_app python manage.py dumpdata --format json --indent &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; app_data.dataclass --natural-primary --natural-foreign &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; zstd &amp;gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DATE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date +%Y%m%d_%H:%M:%S&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_instance.zst&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DATE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; start dumping INSTANCE to &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; cavaliba_app python manage.py dumpdata --format json --indent &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; app_data.datainstance --natural-primary --natural-foreign &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; zstd &amp;gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DATE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date +%Y%m%d_%H:%M:%S&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_conf.zst&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DATE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; start dumping CONF to &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; cavaliba_app python manage.py dumpdata --format json --indent &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; app_home.cavalibaconfiguration --natural-primary --natural-foreign &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; zstd &amp;gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DATE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date +%Y%m%d_%H:%M:%S&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$BACKUPDIR&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;DAY&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOUR&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;_iam.zst&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$DATE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; start dumping IAM (USER GROUPS PERM ROLES) to &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;docker &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; cavaliba_app python manage.py dumpdata --format json --indent &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; app_user --natural-primary --natural-foreign &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; zstd &amp;gt;&lt;span class=&#34;nv&#34;&gt;$FILE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&#34;hextra-code-copy-btn-container hx-opacity-0 hx-transition group-hover/code:hx-opacity-100 hx-flex hx-gap-1 hx-absolute hx-m-[11px] hx-right-0 hx-top-0&#34;&gt;
  &lt;button
    class=&#34;hextra-code-copy-btn hx-group/copybtn hx-transition-all active:hx-opacity-50 hx-bg-primary-700/5 hx-border hx-border-black/5 hx-text-gray-600 hover:hx-text-gray-900 hx-rounded-md hx-p-1.5 dark:hx-bg-primary-300/10 dark:hx-border-white/10 dark:hx-text-gray-400 dark:hover:hx-text-gray-50&#34;
    title=&#34;Copy code&#34;
  &gt;
    &lt;div class=&#34;copy-icon group-[.copied]/copybtn:hx-hidden hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
    &lt;div class=&#34;success-icon hx-hidden group-[.copied]/copybtn:hx-block hx-pointer-events-none hx-h-4 hx-w-4&#34;&gt;&lt;/div&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;CLI data export&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;cli-data-export&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#cli-data-export&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;You can export specific object to any file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cavaliba schema --schema mybookstore --json &amp;gt; /my/backup/dir/schema_mybookstore.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And reload with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cavaliba load schema_mybookstore.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Cavaliba Software distribution&lt;span class=&#34;hx-absolute -hx-mt-20&#34; id=&#34;cavaliba-software-distribution&#34;&gt;&lt;/span&gt;
    &lt;a href=&#34;#cavaliba-software-distribution&#34; class=&#34;subheading-anchor&#34; aria-label=&#34;Permalink for this section&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;You should also keep the downloaded software distribution for later reinstall :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ wget https://cavaliba.com/download/cavaliba/latest.tar.gz
$ cp latest.tar.gz /my/backup/dir
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
    <item>
      <title>Periodic tasks</title>
      <link>http://localhost:1313/docs/80operation/peridodic_tasks/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>http://localhost:1313/docs/80operation/peridodic_tasks/</guid>
      <description>
        
        
        &lt;p&gt;Cavaliba has an internal scheduler to run various periodic tasks. You have nothing to configure.&lt;/p&gt;
&lt;p&gt;The only tasks not handled internally are backup tasks which you should configure on your own (see dedicated doc page).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Current internal Tasks&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;log_purge&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_home.tasks.log_purge&amp;quot;,
    &amp;quot;schedule&amp;quot;: crontab(hour=20, minute=42),
},
&amp;quot;clear_expired_sessions&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_home.tasks.clear_expired_sessions&amp;quot;,
    &amp;quot;schedule&amp;quot;: crontab(hour=19, minute=12),
},
&amp;quot;archive_expired_sirene&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_sirene.notify.archive_expired_sirene&amp;quot;,
    &amp;quot;schedule&amp;quot;: 60.0,
},
&amp;quot;status_run_monitor&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_status.tasks.task_run_monitor&amp;quot;,
    &amp;quot;schedule&amp;quot;: 15.0,
},
&amp;quot;status_sample_hour&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_status.tasks.task_sample_hour&amp;quot;,
    &amp;quot;schedule&amp;quot;: 60.0,
},
&amp;quot;status_sample_day&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_status.tasks.task_sample_day&amp;quot;,
    &amp;quot;schedule&amp;quot;: 900.0,
},
&amp;quot;status_cleanup_raw&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_status.tasks.task_cleanup_raw&amp;quot;,
    &amp;quot;schedule&amp;quot;: 900.0,
},
&amp;quot;status_cleanup_hour&amp;quot;: {
    &amp;quot;task&amp;quot;: &amp;quot;app_status.tasks.task_cleanup_hour&amp;quot;,
    &amp;quot;schedule&amp;quot;: 18000.0,
},
&lt;/code&gt;&lt;/pre&gt;

      </description>
    </item>
    
  </channel>
</rss>
