0

Is it safe to clean out the contents of the C:\ProgramData\firebird folder, i.e. wipe it, when the Firebird service (superserver, v3.0) is not running?

I understand that it contains lock tables etc. so should not be touched while FB is running. But it's not clear to me if it can be wiped safely when FB is not running, or if it contains data that can be vital when FB starts up again.

My situation is that I'm migrating a VM with an FB installation. Migration has been done like this, due to practical reasons (uptime vs. file transfer & VM conversion time):

  1. Snapshot of source VM, i.e. nightly backup is copied to new location. Source stays up and running. Copy process takes about 1 day. (We have the databases locked with nbackup when nightly snapshot is taken).

  2. Snapshot is unpacked at target location, converted from VMWare to HyperV and brought online for additional reconfig and system testing.

  3. A few days pass.

  4. Both source and target Firebird services are stopped, so no database activity is going on anywhere.

  5. Sync files from source to target, including database files. This file transfer is much smaller then in step 1 so it can be done during offline time.

In step 5 I find diffs in the C:\ProgramData\firebird folder, and I'm wondering what would be the best approach:

A) Wipe the folder at target.

B) Sync so target has the same content as source.

C) Leave target as is.

Please note that when FB service is started again at target, the database files will be identical with those at the source at the time of FB shutdown, and probably won't "match" the contents of C:\ProgramData\firebird at target. I would assume that this fact rules out option C).

Kjell Rilbe
  • 1,331
  • 14
  • 39
  • 1
    As far as I know, it is only for transient information during runtime of the server, so wiping should be safe. Posting as a comment, because I'm not 100% sure. – Mark Rotteveel Jan 11 '20 at 07:40
  • Found item 11 in this list: https://ib-aid.com/en/articles/23-more-ways-to-speed-up-firebird/ Seems to indicate that it's safe. That text doesn't even mention that FB should be taken offline first. – Kjell Rilbe Jan 11 '20 at 09:57
  • That is because on Windows, you can't delete files that you have open. On Linux it could be more risky though (especially when using Classic), because on Linux you can delete files when a process has them open, and that could result in an existing process using a now-deleted lock file (which still exists without a directory entry), and a new process will create a new lock file. – Mark Rotteveel Jan 11 '20 at 12:03
  • Someone downvoted this question without making a comment. What's wrong with it? – Kjell Rilbe Jan 12 '20 at 23:57
  • 1
    Probably because this is a question that would have been more on-topic on https://dba.stackexchange.com/ than on Stack Overflow – Mark Rotteveel Jan 13 '20 at 08:06

1 Answers1

2

The files in C:\ProgramData\firebird are only used during runtime of the Firebird server and contain transient data. It should be safe to delete these files when Firebird is not running.

In other words, when migrating from one server to another, you do not need to migrate the contents of C:\ProgramData\Firebird.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197