This is part 2 of our Restic overview. Just for review last time we learned that restic is a command line backup tool written in go. We learned how to create a repo to hold our backups (snapshots). We defined environment variables so restic could aitomatical find our repo and the password for that repo. we backed up our documents directory. Today in part 2 we are going to learn about managing our backups - from here out we will be refering to them as snapshots as that is what restic calls them.
Restic is a command line backup tool written in Googles go language. This tool totally rocks. You start by defining a backup repository that can be a local file system path, SFTP server, AWS S3, Minio server backed by S3, or various other ways. Restic is open source and has docs on how to expand its capabilities like adding your own backup target perhaps a SQL Database, etc. Lets look at a simple example of creating a local repo for the backups.
#Requires -Version 3.0 <# .SYNOPSIS Pauses execution until scriptblock returns expected object. .DESCRIPTION The command will wait for a specific object to be returned from a scriptblock. If the object is returned the command will return the object and the script will continue execution but if the object is not returned before the timeout then an error record is returned and continuation of the script depends on ErrorAction Preference .PARAMETER InputObject The Object that is expected to be returned from the scriptblock.
Theses commands need to be found in the path environment variable. Go Tool Commands Ran from the root of the main package. Build package and all sub-packages: go build -v ./… Git Commands Ran from root of git repository. Stage all files for commit: git add –all Commit to local repository: git commit -m "message for commit" Push to remote repository: git push origin master Pull from remote repository:
This is an updated version of the Import and Export Credential functions that store the creds in a json format versus the clixml format used by the original created by the guys @ powertips & powershell.com. I also store them in a known location and I use a string for a look up key to store and retrieve them. This allows me to use EFS to further secure the files on the drive.
the other day we had a need to save an HTML file as DOCX. We are creating the HTML file using ConvertT0-HTML. The file contains data that needs to be saved in SharePoint and needs to be editable by others. We decided to save as a DOCX because those in management all have WORD installed but don’t have a Dedicated HTML editor. So here is the Code Enjoy. !!! YOU MUST HAVE WORD 2007 or 2010 INSTALLED !