Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perplexityjeff/Backup-VirtualBox-PowerShell
A simple PowerShell script that allows you to backup VirtualBox machines
https://github.com/perplexityjeff/Backup-VirtualBox-PowerShell
backup backup-virtualbox-powershell ova powershell virtualbox windows
Last synced: 3 months ago
JSON representation
A simple PowerShell script that allows you to backup VirtualBox machines
- Host: GitHub
- URL: https://github.com/perplexityjeff/Backup-VirtualBox-PowerShell
- Owner: perplexityjeff
- License: mit
- Created: 2019-12-23T18:25:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T09:24:02.000Z (3 months ago)
- Last Synced: 2024-08-01T15:53:24.464Z (3 months ago)
- Topics: backup, backup-virtualbox-powershell, ova, powershell, virtualbox, windows
- Language: PowerShell
- Homepage:
- Size: 80.1 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - perplexityjeff/Backup-VirtualBox-PowerShell - A simple PowerShell script that allows you to backup VirtualBox machines (PowerShell)
README
# Backup-VirtualBox-PowerShell
A simple PowerShell script that allows you to backup VirtualBox machines.They are being exported using the VBoxManage command line that comes with VirtualBox. It (gently) stops the machine, takes an OVA and starts it back up.
## Usage
Here is a simple example of the script that you use to backup a VM:`.\Backup-VirtualBox.ps1 -VM 'VM Test' -Destination D:\Backup -Compress -StartAfterBackup -Verbose`
Please use Get-Help for more examples within the script:
`Get-Help .\Backup-VirtualBox.ps1 -Examples`
## Mode: FullBackup
This mode is shutting down the VM (gracefully) and exporting the VM to a OVA.* VM: This is the VM name as displayed in VirtualBox itself
* Destination: This is the folder in which the backup will be stored
* Suffix: This gets added after the filename generated
* Compress: This allow you to have compression of the backup using [7-Zip](https://www.7-zip.org/)
* CompressExtension: This allows you to change the compression type e.g "zip" or "7z" and is optional
* CompressLevel: This allows you to change the compression level e.g "1", "3", "5" (Default), "7", "9"
* StartAfterBackup: This allows you to start the VM back up after the backup
* Force: This is used to tell VirtualBox to force shutdown (poweroff) the VM instead of acpipowerbutton method## Mode: Snapshot
This only creates a snapshot of the VM* VM: This is the VM name as displayed in VirtualBox itself
* Snapshot: This is a switch to get into snapshot mode. This does not save it to a destination thus not a backup
* Keep: This allows you to specify the amount of days of snapshots to keep, older snapshots will be deleted. This function is optional## Filenames
The filename of the backup or snapshots by default is the VM name and a date timestamp (yyyyMMdd-HHmmss). Using the optional Suffix parameter for backups you can add something after that, for example "Daily".## Prerequisite
* [7-Zip](https://www.7-zip.org/) is needed to do the compression if you should choose that option from the script this is done because the archiving functions of .NET do not allow archiving of large files.## Learning
The script is me learning PowerShell and doing day to day tasks or just for the fun of it. I am not a PowerShell pro but I hope this will help someone.