GithubHelp home page GithubHelp logo

rinabackup's Introduction

RinaBackup

RinaBackup is an automated backup script tailored for my personal use. Written in PowerShell, it is primarily designed to backup files from PCs and laptops to a centralized storage. After configuration, it is recommended to set the script up to run automatically via Task Scheduler.

  • Incrementally backs up files into 7-Zip archives or directories.
  • Special handling for OneDrive folders and VMware VMs.
  • Comprehensive and configurable backup controls.

Configuration File

Upon the first run, the script generates a configuration file Config_%COMPUTERNAME%.psd1 in its directory. Edit the file before running this script again.

<#
    Common Options:
    - Enable:       Enable or disable the backup section.
    - DaysOfWeek:   Specifies days of the week for backup; an empty value skips the check.
                    Accepts: @('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday').
    - NetworkName:  Run only if connected to the specific network; an empty value skips the check.
                    Get network name with cmdlet: `Get-NetConnectionProfile`
    - CheckProc:    Skip action if running processes are found in source.

    Archives Options:
    - Executable:   Path to the 7-Zip executable.
    - Sources:      Source directories to archive.
    - Destination:  Destination path for the archive.
    - Exclusion:    Patterns to exclude from archiving.
    - Password:     Password for archive (DPAPI encrypted).

    Directories Options:
    - Source:       Source directory for backup.
    - Destination:  Destination path for backup.
    - RoboArgs:     Additional arguments passed to robocopy.

    OneDrive Options:
    - AutoUnpin:    Free up space except for "always keeps on this device" files.
    - Source:       Source directory for OneDrive backup.
    - Destination:  Destination path for OneDrive backup.

    VMWare Options:
    - SkipRunning:  Skip running VMs.
    - KeepExtra:    Keep extra VMs in destination not found in source.
    - Source:       Source directory for VMWare backup.
    - Destination:  Destination path for VMWare backup.

    Notes:
    - Environment variables can be used, enclosed in '%' (e.g. '%USERPROFILE%').
    - Passwords require an encrypted string using the Windows Data Protection API (DPAPI).
      They can be created with the following command: `Read-Host -AsSecureString | ConvertFrom-SecureString`
#>

@{
    Archives    = @(
        @{
            Enable      = $false
            DaysOfWeek  = @()
            NetworkName = ''
            CheckProc   = $true
            Executable  = ''
            Sources     = @()
            Destination = ''
            Exclusion   = @()
            Password    = ''
        }
    )
    Directories = @(
        @{
            Enable      = $false
            DaysOfWeek  = @()
            NetworkName = ''
            CheckProc   = $false
            Source      = ''
            Destination = ''
            RoboArgs    = @()
        }
    )
    OneDrive    = @{
        Enable      = $false
        DaysOfWeek  = @()
        NetworkName = ''
        CheckProc   = $false
        Source      = '%OneDrive%'
        Destination = ''
        AutoUnpin   = $false
    }
    VMWare      = @{
        Enable      = $false
        DaysOfWeek  = @()
        NetworkName = ''
        SkipRunning = $true
        KeepExtra   = $true
        Source      = ''
        Destination = ''
    }
}

rinabackup's People

Contributors

libertypi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.