FABSYS_DUMP-DELETE(1)

NAME
fabsys_dump-delete - Delete FABS volume dumps

SYNOPSIS
fabsys dump-delete (<id> [<id> ...] | [--brid <brid>]
    [--volid <volid> | --volume <volume>]
    [--before <time] [--after <time]
    [--redundant[=<redundancy>]]
    [-n <n_dumps>] )
    [--keep-blob]
    [--verbose]

DESCRIPTION
The fabsys dump-delete deletes volume dumps from FABS. Many options to this command are the same as in "fabsys_dump-list(1)"; see "fabsys_dump-list(1)" for more info.

For all matching volume dumps, fabsys dump-delete will delete the volume dump from the FABS database, as well as the corresponding volume dump blob on disk if it exists (unless --keep-blob is given). If the deleted volume dump was the last volume dump for a backup run, that backup run is also deleted.

As volume dumps and backup runs are deleted from the database, information on what was deleted is printed to stdout (or recorded in a JSON object, if --format json was given). To see what would be deleted before actually deleting the dumps, give the same search criteria to "fabsys_dump-list(1)". You can then run fabsys_dump-delete with the same search criteria, or just call fabsys_dump-delete with the volume IDs shown by "fabsys_dump-list(1)".

OPTIONS

<id> [<id> ...]
    Delete the given volume dump IDs.

--brid <brid>
--volid <volid> | --volume <volume>
--before <time>
--after <time>
--redundant[=<redundancy>]
-n <n_dumps>
    These options are the same as in "fabsys_dump-list(1)", except the matching volume dumps are deleted instead of just shown.

--verbose
    Print some extra information on stderr, such as our search criteria.

--keep-blob
    Just delete the matching volume dump records from the FABS database. Do not delete the corresponding dump blob file from disk.

EXAMPLES
    $ fabsys dump-delete --volume vol.1 --before 2022-02-18 --redundant
    Deleting Volume dump id 2003, volume: 536871063 (vol.1)
      cloned at:    Mon Feb 14 18:47:30 2022
      last updated: Mon Feb 14 18:46:57 2022
      dump blob: /var/lib/fabs/fabs-dumps/cell-example.com/20/00/00/536871063/536871063.8001.dump
    Deleting Backup run 5 [DONE]: Manually-issued backup run from command line
      status.2918: Done
      cell: example.com, volume: None, errors: 0
      start: Mon Feb 14 18:47:19 2022 EST
      end:   Mon Feb 14 18:51:13 2022 EST
    Successfully deleted 1 dump

    $ fabsys dump-delete --volume vol.1 --before 2022-02-18 --redundant --format json | jq
    {
      "fabs_dump_delete": [
        {
          "dump": {
            "id": 2003,
            "vl_id": 8001,
            "hdr_size": 31,
            "hdr_creation": 1644882450,
            "hdr_copy": 1630435695,
            "hdr_backup": 1644882450,
            "hdr_update": 1644882417,
            "incr_timestamp": 0,
            "dump_size": 32586,
            "dump_storid": 1,
            "dump_spath": "cell-example.com/20/00/00/536871063/536871063.8001.dump",
            "dump_checksum": "md5:ebb0dfbd0badc6721a7f1c8b557fc06c",
            "name": "vol.1",
            "rwid": 536871063,
            "roid": null,
            "bkid": 536871065,
            "cell": "example.com",
            "br_id": 5,
            "dump_blob": {
              "bstore": {
                "uuid": "a6888379-dfe9-4b72-a95a-eb13bb6b7c18",
                "storid": 1,
                "prefix": "/var/lib/fabs/fabs-dumps"
              },
              "rel_path": "cell-example.com/20/00/00/536871063/536871063.8001.dump",
              "abs_path": "/var/lib/fabs/fabs-dumps/cell-example.com/20/00/00/536871063/536871063.8001.dump"
            }
          }
        },
        {
          "backup_run": {
            "cell": "example.com",
            "dv": 2918,
            "end": 1644882673,
            "errors": 0,
            "id": 5,
            "injected_blob_checksum": null,
            "injected_blob_spath": null,
            "injected_blob_storid": null,
            "note": "Manually-issued backup run from command line",
            "start": 1644882439,
            "state": "DONE",
            "state_descr": "Done",
            "state_last": null,
            "state_source": "fabs-1 pid:31564",
            "volume": null
          }
        }
      ]
    }

PRIVILEGED REQUIRED
The issuer of this command must be able to read the FABS configuration (specifically, the database access information), typically in /etc/fabs/fabs.yaml.d/.

COPYRIGHT
Copyright (c) 2022, Sine Nomine Associates.

See the provided LICENSE file for licensing terms.