From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 805E26B3DB for ; Mon, 20 Sep 2021 11:18:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7E73D1E907 for ; Mon, 20 Sep 2021 11:18:49 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id E8CE11E8FE for ; Mon, 20 Sep 2021 11:18:48 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C04CC43FA4 for ; Mon, 20 Sep 2021 11:18:48 +0200 (CEST) From: Hannes Laimer To: pbs-devel@lists.proxmox.com Date: Mon, 20 Sep 2021 11:18:39 +0200 Message-Id: <20210920091839.12252-1-h.laimer@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.098 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup] docs/technical-overview: add troubleshooting section X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2021 09:18:49 -0000 --- docs/technical-overview.rst | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/docs/technical-overview.rst b/docs/technical-overview.rst index 0468397b..0958290c 100644 --- a/docs/technical-overview.rst +++ b/docs/technical-overview.rst @@ -164,3 +164,61 @@ Verification of encrypted chunks For encrypted chunks, only the checksum of the original (plaintext) data is available, making it impossible for the server (without the encryption key), to verify its content against it. Instead only the CRC-32 checksum gets checked. + +Troubleshooting +--------------- + +Index files(.fidx, .didx) contain information about how to rebuild a file, more precisely, they +contain an ordered list of references to the chunks the original file was split up +in. If there is something wrong with a snapshot it might be useful to find out +which chunks are referenced in this specific snapshot, and check wheather all of +them are present and intact. The command for getting the list of referenced chunks +could look something like this: + +.. code-block:: console + + # proxmox-backup-debug inspect file drive-scsi0.img.fidx + +The same command can be used to look at .blob file, without ``--decode`` just the size +and the encryption type, if any, is printed. If ``--decode`` is set the blob file is +decoded into the specified file('-' will decode it directly into stdout). + +.. code-block:: console + + # proxmox-backup-debug inspect file qemu-server.conf.blob --decode - + +would print the decoded contents of `qemu-server.conf.blob`. If the file you're +trying to inspect is encrypted, a path to the keyfile has to be provided using +``--keyfile``. + +Checking in which index files a specific chunk file is referenced can be done +with: + +.. code-block:: console + + # proxmox-backup-debug inspect chunk b531d3ffc9bd7c65748a61198c060678326a431db7eded874c327b7986e595e0 --reference-filter ../../ + +Here ``--reference-filter`` specifies where index files should be searched, this can be an +arbitrary path. If, for some reason, the filename of the chunk was changed you can explicitly +specify the digest using ``--digest``, by default the chunk filename is used as the digest +to look for. Specifying no ``--reference-filter`` will just print the CRC and encryption status +of the chunk. You can also decode chunks, to do so ``--decode`` has to be set. If the chunk +is encrypted a ``--keyfile`` has to be provided for decoding. + +Restore without a running PBS +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is possible to restore snapshots even without a running PBS, assuming you have +access to the index and chunk files, if encrypted you'll also need the keyfile +it was encrypted with. + +.. code-block:: console + + # proxmox-backup-debug recover index drive-scsi0.img.fidx ../../../.chunks + +where `../../../.chunks` is the path to the directory that contains contains the +chunks and `drive-scsi0.img.fidx` is the index-file of the file you'd lile to +restore. Both paths can be absolute or relative. With ``--skip-crc`` it is possible to +disable the crc checks of the chunks, this will speed up the process, however should +probably only be used for testing. + -- 2.30.2