2

Is there a way in which i could back just a set of tables in cache? I've looked at the System management portal and it seems all you could do are are the following.

  1. Configure Full Backup of All Databases
  2. Configure Full Backup of the Database List
  3. Configure Incremental Backup of the Database List
  4. Configure Cumulative Backup of the Database List
  5. Backing Up Selected Globals using the Export option from the [Home] > [Globals] page of the System Management Portal

All of the above can be scheduled as a background task, but option #5 cannot be scheduled, or can it be? if i can schedule #5 option as a background task then i'd back up the D globals nightly and re-import when in need.

Thanks

JasG
  • 21
  • 1

2 Answers2

1

Just a note, in Caché standard backups only for databases, not for namespaces.
So, there some ways to do your task.

  1. Split your data, for different databases. Every namespace through globals mapping could define as many databases as you need. More info about mapping.
  2. Possible to write custom task, which will do everything as you want, and it will work as well any other tasks, and could be scheduled as you need. And here two ways.
    • RunLegacyTask — run a legacy task; enter the code to execute in the text box
    • You can define your own task types using the %SYS.Task.Definition API; see the class documentation in the InterSystems Class Reference.

Export globals programmatically could be managed with

  1. $system.OBJ.Export("Global.GLB","backup.xml") and $system.OBJ.Load("backup.xml") for import. But you should remember, that such files weight bigger than data.
  2. other formats, like GOF, with %Global
DAiMor
  • 3,185
  • 16
  • 24
1

As DAiMor mentioned above, you either need to export globals one-by-one or to create namespace where all the globals you need to backup would be located in dedicated CACHE.DAT file (see Global Mapping in docs).

For backing up this database Legacy Backup might not be the best option. If you can afford downtime - just stop Cache' and copy CACHE.DAT file. If you have storage with snapshot functionality - write daemon freeze + storage snapshot is your best bet for no-downtime backup.

http://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls?KEY=GCDI_backup#GCDI_backup_methods

Anton
  • 3,587
  • 2
  • 12
  • 27