From 9370854ad508744336b472fbd8123c5b0f8b7af5 Mon Sep 17 00:00:00 2001 From: Tom Peltonen Date: Sun, 25 Jul 2021 23:16:10 +1000 Subject: [PATCH] MOre work on documentation --- Compress.md | 31 +++++++++++++++++++++++-- PeterDocs/PeterDocs.psm1 | 2 -- ReceiveArchive.md | 50 ++++++++++++++++++++++++++++++++++++++++ SendArchive.md | 16 +++++++++++++ 4 files changed, 95 insertions(+), 4 deletions(-) diff --git a/Compress.md b/Compress.md index bb91a91..146e123 100644 --- a/Compress.md +++ b/Compress.md @@ -2,13 +2,26 @@ ## Source Documents +PeterDocs is intended to be used with documents (files) that need to be transferred +or cloned to a remote location securely. The documents can be binary or text documents, +including personal photographs or sensitive Microsoft Word documents. + +At the remote location a reconciliation can be performed to verify that the documents +have been recieved and no alteration occurred. + ## Why +When you have a sensitive document or many documents to transfer or clone, it is +efficient to compress, consolidate and encrypt the documents into one archive file and +then restore this archive file at the destination. + ## When +You create the archive file when you are ready to transfer the documents. + ## How -To perform the create the archive file you execute the ```Compress-Peter``` function. +To create the archive file you execute the ```Compress-Peter``` function. ```powershell Compress-Peter @@ -24,7 +37,9 @@ Compress-Peter -LogPath ``` -The function requires a ```SourceFolder```. +The function requires a ```SourceFolder```. You need to have +read rights of the source folder and the source folder can be a +lcoal drive or a network drive. Either a ```RecipientKey``` or ```SecretKey``` is required. @@ -38,9 +53,21 @@ The ```Compress-Peter``` compressess the contet of the ```SourceFolder``` and sa as the encrypted ```ArchiveFile```. The archive file also contains the reconciliation file so that the recipient of the archive is able to reconcile the restore at the remote location. +The archive file contains a snapshot of all the existing documents in the source folder, +subject to any filter applied. + If a ```RecipientKey``` is used then an extra file (```SecretFile``) is also created. Do not loose this file as without it you cannot decrypt the archive contents. +The ```SourceFolder``` is not written to or updated. + +If subsequent changes are made to the documents or more documents are added, then you need +execute the compress again. The PeterDocs process does not have the capability to +generate delta archive files. + ## Send Usage +Once the archive file is created you will commonly send or transfer it to anohter +location where it wll be unpacked. + Please read next the documentation on [sending the archive](SendArchive.md) diff --git a/PeterDocs/PeterDocs.psm1 b/PeterDocs/PeterDocs.psm1 index 18b6e52..bc792a1 100644 --- a/PeterDocs/PeterDocs.psm1 +++ b/PeterDocs/PeterDocs.psm1 @@ -1016,8 +1016,6 @@ Param( } -# Receive package - <# .Synopsis diff --git a/ReceiveArchive.md b/ReceiveArchive.md index 6c44844..44a6c1d 100644 --- a/ReceiveArchive.md +++ b/ReceiveArchive.md @@ -2,12 +2,62 @@ ## Why +Once the archive file is sent, you need to download it from its intermediate +location if the source and destination locations are not directky connected. + ## When +The archive is received after it sent. The assunmption is that cloud storage +is being used as an intermediary. + ## How +To receive the archive file you sent using the ```Send-Peter``` function you can +execute the ```Receive-Peter``` function. + +```powershell +Receive-Peter + -SourcePath + -ArchiveFile + -SecretFile + -SourceProfile + -AccountId + -AccountKey + -LogPath +``` + +The ```SourcePath``` is specified as follows: + +* s3://bucketname/path/path/archivefile.7z +* b2://bucketname/path/path/archivefile.7z + +The "s3" prefix is to download from AWS S3. The "b2" prefix +is to download from Backblaze. + +If you are dowloading from AWS you can specify the AWS profile name +in parameter ```SourceProfile```. In this situtation the profile +needs to exist in the AWS credentials on your local device and user profile. + +If you are downloading from Backblaze you specify the ```AccountId``` and the +```AccountKey```. For better security you can save the Account Key as an +environment variable named ```PETERDOCS_ACCOUNTKEY``` + +You can override the ```SecretFile``` file name location on the local device, +but it is recommended to leave at defaults for a better experience. + ## What +The function will retrieve the archive file either from an AWS S3 bucket or +from a Backblaze bucket. + +If your archive file is on a web site or network folder then you will need to +use other tools to download the archive file and the key file. + +The function will not expand or reconcile the restore at the destination. + +Please ensure you have sufficent storage to accomodate the local copy of the +archive and space to unpack it. + ## Expand Usage Please read next the documentation on [expand the archive](Expand.md) diff --git a/SendArchive.md b/SendArchive.md index 471c488..d89fa4b 100644 --- a/SendArchive.md +++ b/SendArchive.md @@ -6,6 +6,22 @@ ## How +To send the archive file you use the ```Send-Peter``` function. It is your choice +on whether you use the ```Send-Peter``` function to send the archive file and ".key" +file or another program or command line. + +```powershell +Send-Peter + -ArchiveFile + -TargetPath + -SecretFile + -TargetProfile + -AccountId + -AccountKey + -LogPath + +``` + ## What ## Receive Usage