TiNa - Recycle Cartridges and Catalog Backup & Purge/Defrag

First, close all TiNa apps (GUI TiNa, etc.).

Connection

Connect to the Tina Server:

# ssh TINA-SERVER-001

Recycle cartridges

Seach for the cartridge ready to be recycled with tina_cart_control -list:

# /usr/TiNa_Path/Bin/tina_cart_control -list -v_name -v_location -v_recyclable -v_recycle_age -v_status -v_close_status -status_filter recyclable
Name             Location      Recyclable          Cycle Age    Overall Status    Status

P_6M-0001337 ROBOT-T800 Recyclable since 40d 0h Full Closed
P_6M-0001338 ROBOT-T800 Recyclable since 33d 0h Full Closed
P_6M-0001339 ROBOT-T800 Recyclable since 25d 6h Full Closed
P_1W-0001342 ROBOT-T800 Recyclable since 14d 19h Full Closed
P_3M-0001019 VLS Recyclable since 7d 0h Full Closed
P_3M-0001022 VLS Recyclable since 7d 0h Full Closed
P_3M-0001432 VLS Recyclable since 7d 0h Full Closed
[...]

Recycle the expired and closed cartrides on ROBOT-T800 and VLS:

# /usr/TiNa_Path/Bin/tina_cart_control -recycle P_6M-0001338
Operation on cartridge "P_6M-0001338" in progress

Cartridge operation is done

Errors encountered

Possible errors when recycle:

Recycling cartridge P_1Y-0001592 may corrupt backup integrity: Unselected
No cartridge selected

Maybe they are simply not ready for recycle…

Name             Location      Recyclable            Cycle Age    Overall Status    Status

P_1Y-0001592 ROBOT-T800 No (data integrity) Full Closed

Possible forcing (Not Tested)

# /usr/TiNa_Path/Bin/tina_cart_control -reopen -label P_1Y-0001592            // Error, TiNa refused
# /usr/TiNa_Path/Bin/tina_cart_control -recycle -label P_1Y-0001592 -force // Not Tested

Purge catalog

Purge the unused entries from the catalog:

# /usr/TiNa_Path/Bin/tina_odbgc -purge -sync -catalog MyCatalogName

Check current jobs before stopping catalog

None job

Check if jobs are running or scheduled:

# /usr/TiNa_Path/Bin/tina_acct -display_active_jobs_only
*****************************************************
Time Navigator Enterprise Edition

Accounting Report (Mon Sep 23 15:12:33 2024)

start date : Sun Sep 22 15:12:33 2024
end date : Mon Sep 23 15:12:33 2024
*****************************************************


+---------------------------------------------------------------------+

CATALOG

Name : MyCatalogName
Server : TINA-SERVER-001.MyCatalogName.mydomain.org

+---------------------------------------------------------------------+
No Jobs

Jobs running

If jobs are running like below:

# /usr/TiNa_Path/Bin/tina_acct -display_active_jobs_only

[...]
--------------------------------------------------------------------------------
Backup SERVER-PROD-0014.MyCatalogName.mydomain.org A (Full) RUNNING
--------------------------------------------------------------------------

Submit:20 Sep 14:00
Running:20 Sep 14:00
End :*
Backup :20 Sep 14:00

Id:131817 Volume: 149,494,555,484 Objects:5993
Job Priority: medium

Backup Format: TiNa
Cartridges:
V_1M-0001337@VLS_d0 / 3
V_1M-0001337@VLS_d0 / 4
V_1M-0001337@VLS_d0 / 5
V_1M-0001337@VLS_d0 / 6
V_1M-0001337@VLS_d0 / 7
V_1M-0001337@VLS_d0 / 8
V_1M-0001337@VLS_d0 / 9
[...]

Wait the end of running jobs

Jobs scheduled

If jobs are scheduled like below:

# /usr/TiNa_Path/Bin/tina_acct -display_active_jobs_only

--------------------------------------------------------------------------------
BACKUP "SERVER-PROD-0015.MyCatalogName.mydomain.org" "" Full
--------------------------------------------------------------------------------
Backup SERVER-PROD-0015.MyCatalogName.mydomain.org A (Full) SCHEDULED
--------------------------------------------------------------------------

Submit:20 Sep 14:00
Running:*
End :*
Backup :*

Id:131816 Volume: 0 Objects:0
Job Priority: medium

Look when they will be launched and unschedule them if needed:

# /usr/TiNa_Path/Bin/tina_job_control -view -jobid <ID_Job>

Id: 131816
Description: Backup SERVER-PROD-0015.MyCatalogName.mydomain.org A (Full)
Priority: medium
Status: Scheduled
Alarm (Max Severity): -
Number of Alarms: 0
Host: SERVER-PROD-0015.MyCatalogName.mydomain.org
User: -
Duplicated Job: No
Submit: Fri Sep 20 14:00:01 2024
Execution: -
Start: -
End: -
Expected Volume: 0
Processed Volume: -
Processed Objects: 0
Average Rate (GB/H): 0.0

Unschedule a job:

# /usr/TiNa_Path/Bin/tina_job_control -cancel -jobid <ID_Job>

Stop catalog

Put the catalog in maintenance:

# /usr/TiNa_Path/Bin/tina_catalog_ctrl -maintenance
Catalog MyCatalogName: state = OK activity = Maintaining

Then stop it:

# /usr/TiNa_Path/Bin/tina_catalog_ctrl -stop
Catalog MyCatalogName: state = OK activity = Stopped

Backup the catalog:

Catalog size

# du -sh /BACKUP/TiNa/catalogs/catalog_$(date +%d-%m-%Y).cod 
3.8G /BACKUP/TiNa/catalogs/catalog_2024-09-23.cod

Backup the catalog (may take a long time):

# /usr/TiNa_Path/Bin/tina_odbsave -catalog MyCatalogName -file /BACKUP/TiNa/catalogs/catalog_$(date +%Y-%m-%d).cod

Delete old version of catalog :

# rm -fr /BACKUP/TiNa/Data.MyCatalogName.old

And rename the current catalog to .old

# mv /BACKUP/TiNa/Data.MyCatalogName /BACKUP/TiNa/Data.MyCatalogName.old_$(date +%Y-%m-%d)

Defrag the catalog:

Defrag and Rebuild the catalog from last backup file (very long 20-25min):

# /usr/TiNa_Path/Bin/tina_init -file /BACKUP/TiNa/catalogs/catalog_$(date +%Y-%m-%d).cod -catalog_name MyCatalogName

Catalog size

# du -sh /BACKUP/TiNa/catalogs/catalog_$(date +%Y-%m-%d).cod 
1.5G /BACKUP/TiNa/catalogs/catalog_2024-09-23.cod

The catolog should be lighter

Sart catalog

Start it:

# /usr/TiNa_Path/Bin/tina_catalog_ctrl -start
Catalog MyCatalogName: state = OK activity = Start

Stop/Start TiNa

Not needed below for above tasks, but usefull to know:

Stop Tina

# /etc/init.d/tina.MyCatalogName stop
Stopping tina.MyCatalogName (via systemctl): [ OK ]

Verify and kill if some processes still exists:

# ps aux | grep tina
# pkill -9 tina

Start TiNa

Start the TiNa service:

# /etc/init.d/tina.MyCatalogName start
Starting tina.MyCatalogName (via systemctl): [ OK ]

Check the status of the catalog:

# /usr/TiNa_Path/Bin/tina_catalog_ctrl -statu
Catalog MyCatalogName: state = OK activity = Active

Documentation

TiNa help

> Partager <