The LOB columns have to be kept, every night

DBBlobEditor » Use cases » Sync from the command line

Download DBBlobEditor Free Trial »     Buy DBBlobEditor Now »

The situation

Ordinary row data is easy to protect - the database's own dump handles it. The LOB columns are the awkward part: they are huge, they are often excluded from backups to keep them small, and the documents inside them are exactly the files an organisation cannot lose.

Keeping a copy by clicking through an export each week does not survive a busy month. The job has to run by itself, and it has to be visible when it fails.

What you do

  1. Set the export up once in the GUI - the table or query, the LOB column, the output folder and the file naming - and save it as a task.
  2. Give that task to the CLI mode, so it can run without a window: on Windows via Task Scheduler, on Linux and macOS via cron.
  3. Schedule it as often as the data changes. Each run reads the rows and writes the files; the log says what it read and what it wrote.
  4. For the reverse direction - files back into the column - the same saved task and CLI run applies, which is how a synchronised pair of environments is kept in step.

Creating a batch file for a scheduled LOB task in DBBlobEditor

Because the task is a saved configuration rather than a script around the tool, changing the query, the folder or the destination is a matter of editing the task once - and every machine that runs it follows. See saving and loading tasks and scheduling a task for the mechanics.

What it will not do

Related

The mechanics: command line, save and load a task, schedule a task, automating BLOB synchronisation. The export itself: batch import and export LOB data, files into a BLOB column. Checking the result: see what is in a BLOB column.