SIGN UP LOGIN

Back up Windows to the cloud with PowerShell in 10 steps

Published 29 July 2026 · 10 steps · ← Blog

How to back up Windows to the cloud with PowerShell: ten short steps from zero to an automatic, end-to-end encrypted backup that runs as a scheduled task. Every PowerShell command is ready to copy.

Step 1 / 10

Step 1: Sign up

Sign up at portal.lionbackup.cloud. After confirming your email address and setting up the mandatory two-factor authentication (TOTP), you are ready to go. There is no base fee; you pay for what you store.

Sign-up form in the portal (German user interface)

Step 2: Create an organisation and a project

In the portal, first create your organisation (company details for the invoice), then a project, for example “Office backup”. Every project has its own project UUID; you need it in step 7.

Creating an organisation and a project in the portal (German user interface)

Step 3: Create a write token

In the project, create a write token. lionbackup separates strictly: a write token can only back up, it can never read or restore. Even if it is stolen, your backups stay unreadable.

Important: the token is shown only once. Copy it straight into the configuration (step 7).
Creating a write token in the portal (German user interface)

Step 4: Create the folder structure

We use a fixed, tidy structure under C:\lionbackup:

New-Item -ItemType Directory -Force -Path C:\lionbackup\bin,C:\lionbackup\conf,C:\lionbackup\key,C:\lionbackup\log,C:\lionbackup\tmp | Out-Null
FolderPurposeSizeRecommended medium
binthe client program~10 MBany (internal disk)
confconfiguration files< 1 MBany
keykey pair< 1 MBany, but keep a copy elsewhere! (step 6)
loglogsa few MBany
tmpworking area: compression and encryption happen here≥ 1.2× your largest backupinternal SSD/NVMe: the faster, the faster the backup. No USB stick, no network drive
Explorer: C:/lionbackup with its subfolders (German user interface)

Step 5: Download the lionbackup client

Download the official Windows client straight from our download server:

Invoke-WebRequest -Uri https://downloads.prod.lionbackup.cloud/lionbackup-windows-amd64.exe -OutFile C:\lionbackup\bin\lionbackup-client.exe

The client is open source: source code on git.lionbackup.cloud.

PowerShell: downloading the client (German user interface)

Step 6: Generate a key pair

Your backups are encrypted on your own computer before they leave the building. For that, generate a key pair once:

C:\lionbackup\bin\lionbackup-client.exe --keygen --output C:\lionbackup\key\lionbackup

This creates two files: lionbackup.pub (public key, encrypts your backups) and lionbackup.key (private key).

⚠️ Keep a copy elsewhere: copy lionbackup.key to a USB stick or a password manager now and keep it apart from the computer. The backup does not need it, but without it no restore is possible. We cannot recover it either: your keys, your data.
PowerShell: generating the key pair (German user interface)

Step 7: Write the configuration file

Create C:\lionbackup\conf\backup.yaml (for example in Notepad) and replace the three placeholders. Important: all settings sit under the root key lionbackup:, each indented by two spaces:

lionbackup:
  environment: prod
  storagezone: "YOUR-STORAGE-ZONE"
  project: "YOUR-PROJECT-UUID"
  token: "YOUR-WRITE-TOKEN"
  files:
    - C:\Users\YourName\Documents
  encryption_keyfile: C:\lionbackup\key\lionbackup.pub
  tmp_directory: C:\lionbackup\tmp
  log_directory: C:\lionbackup\log
  compression_method: ZSTD
  compression_level: 6
  on_read_error: warn
  resume: true
  require_https: true
ParameterMeaning
environmenttarget environment, always prod for customers
storagezoneyour storage zone (shown in the portal), for example de01-1
projectthe project UUID from step 2
tokenthe write token from step 3
filesfiles and folders to back up (one per line)
encryption_keyfilepath to the public key (.pub) from step 6
tmp_directoryworking area (step 4: large and fast)
log_directorywhere the logs go
compression_methodZSTD (recommended), GZIP or LZMA2
compression_level0 to 9; higher means smaller but slower (6 is a good compromise)
on_read_errorwarn (default): skip and report unreadable files; abort: stop hard
resumecontinue interrupted uploads on the next run
require_httpsencrypted connections only (always true)

Step 8: Run a backup

The first run:

C:\lionbackup\bin\lionbackup-client.exe --config C:\lionbackup\conf\backup.yaml --progress-bar

The client explains every step: checking the sources (with a running count), then archiving, compressing, encrypting and uploading each source, then done. It skips Windows special folders (for example the hidden junctions in Documents) automatically and says so. Its output is in German for now.

PowerShell: a running backup with progress (German user interface)

Step 9: Optional: desktop shortcut

For a convenient manual start:

$s=(New-Object -ComObject WScript.Shell).CreateShortcut("$([Environment]::GetFolderPath('Desktop'))\lionbackup Backup.lnk");$s.TargetPath='C:\lionbackup\bin\lionbackup-client.exe';$s.Arguments='--config C:\lionbackup\conf\backup.yaml --progress-bar';$s.WorkingDirectory='C:\lionbackup';$s.Save()

Step 10: Optional: automatic schedule

Back up automatically: pick the rhythm and the time, and the command below adapts at once (PowerShell as administrator):

Register-ScheduledTask -TaskName "lionbackup Backup" -Action (New-ScheduledTaskAction -Execute 'C:\lionbackup\bin\lionbackup-client.exe' -Argument '--config C:\lionbackup\conf\backup.yaml') -Trigger (New-ScheduledTaskTrigger -Daily -At 20:00) -RunLevel Highest -Settings (New-ScheduledTaskSettingsSet -WakeToRun -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable) -Description "Daily lionbackup backup"
💡 Why all the switches? By default Windows does not start scheduled tasks on battery, stops them when the power cable is pulled and does not wake the computer. A laptop would simply never back up. The settings above turn that around: the computer wakes up at the scheduled time, backs up on battery too and catches up on a missed run as soon as it is running again. While the backup runs, the lionbackup client also keeps the device awake so it does not fall asleep in the middle of the upload; the screen may still turn off.

Done. From now on your computer backs up automatically, encrypted end to end, to a sovereign European cloud location of your choice. 🎉

Windows Task Scheduler with the lionbackup task (German user interface)

Backing up a server? What changes there (shadow copies, rights, databases, Hyper-V) is on the page Windows Server cloud backup, and how to restore is in Restore a Windows backup from the cloud.

Can we support you with the setup? Book a free appointment.