Skip to content

Instantly share code, notes, and snippets.

@zekroTJA
Created August 3, 2017 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zekroTJA/e81a55fc508848ca622c19ec4ec011c0 to your computer and use it in GitHub Desktop.
Save zekroTJA/e81a55fc508848ca622c19ec4ec011c0 to your computer and use it in GitHub Desktop.
A little CMDer script to backup your Raspberry Pi

This script requires the program CMDer. Then go to your CMDer installation path (where the CMDer.exe is located) and create there the batch script:

backup.bat

REM Enter here the local path where the script should copy the backup to
SET backuplocation = "E:\Dateien\Raspberry Pi Backup"

SET current=%cd%
SET folder=%time:~0,2%-%time:~3,2%-%time:~6,2%_%date%

E:
cd %backuplocation%
mkdir %folder%
REM Change here the network name or the location of your pi you want to backup
scp -r pi@raspberrypi:/home/pi/ %folder%

%current:~0,2%
cd %current%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment