VPS Snaps

Backing up to OneDrive

Keep backups in a folder of your own OneDrive, personal or work, connected by signing in with Microsoft.

4 min readStorage

OneDrive works as a storage destination for SSH servers, the agent, WordPress sites, Railway and Render databases, Kubernetes and DNS zones, with a personal Microsoft account or a work or school one. Backups go to a folder in your own OneDrive; nothing is kept by VPS Snaps. The agent needs version 1.4.0 or later, and the WordPress plugin 1.2.0 or later.

Step 1 — Sign in with Microsoft

In Storage → Add destination, choose Microsoft OneDrive, name the destination and the folder to make for it, and select Sign in with Microsoft. Pick the account on Microsoft's screen and approve access.

VPS Snaps has app folder access only. It can see and write only its own folder, Apps/VPS Snaps, in your OneDrive, and nothing else there. The folder you name is made inside it.

Step 2 — Choose it on a backup job

Pick the destination on any backup job. Each job gets its own folder inside the one you named. Your servers, agents, WordPress sites and dump containers upload to an upload session VPS Snaps opens for each backup, which can write that one file and nothing else; no Microsoft token is handed out. Restores download through OneDrive's own short-lived download link.

Free disk space for each backup

OneDrive needs each backup as one finished file. So the server, agent, WordPress site, or the dump container in Railway, Render or Kubernetes, writes the backup to its own disk first, then uploads it. It needs free disk about the size of the backup.

Servers need Perl or Python 3

Each backup is checked against the checksum OneDrive keeps for every file, its quickXorHash. A server works it out with Perl, which nearly every Linux server already has, or with Python 3. On a server with neither, the backup passes through VPS Snaps instead, up to 64 MB.

apt-get install -y perl-base   # Debian or Ubuntu
dnf install -y python3         # RHEL-family systems

Backups that pass through VPS Snaps: 64 MB

A few backups stream through VPS Snaps instead of going straight from your side: a Railway database connected without admin access, a Railway or Render dump the platform will not run in your account, and a server that cannot upload for itself. VPS Snaps never writes your data to its own disk, so these can go to OneDrive only up to 64 MB. For anything larger, choose another storage destination for that job.

If your OneDrive is a work or school account

Many organisations let only an administrator approve new apps. If Microsoft says VPS Snaps needs approval, the page gives you a link to send your Microsoft 365 administrator; once they approve it, sign in again. Some organisations also stop apps from having their own folder in OneDrive; if so, signing in says that plainly, and nothing is saved.

What to know about OneDrive

Backups count against your OneDrive space, and a single file can be up to 250 GB; if your OneDrive is full, the backup fails with a message saying so. Retention deletes old backups permanently where your account allows it, and otherwise to OneDrive's recycle bin, where they count against your space until it is emptied. Your Microsoft sign-in tokens are encrypted with AES-256-GCM before they are stored, and a OneDrive no backup has used for 30 days is signed in again automatically, so a paused job does not lose its connection.

Disconnecting

Delete the destination under Storage. VPS Snaps deletes its stored Microsoft tokens. Microsoft gives apps no way to withdraw a sign-in themselves, so the page then links you to where you remove VPS Snaps: account.live.com/consent/Manage for a personal account, or myapps.microsoft.com for a work or school one. The backups already in your OneDrive stay there and are yours: open them in OneDrive, or delete them yourself.

Still stuck?

Open the failed run under Backup History and copy the error text out of the log — pasting that into your first message is usually the difference between one reply and four.