Skip to content

Instantly share code, notes, and snippets.

@vlrmprjct
Last active June 16, 2018 13:25
Show Gist options
  • Save vlrmprjct/e576edc2d68a9da432365da9ee08a0c2 to your computer and use it in GitHub Desktop.
Save vlrmprjct/e576edc2d68a9da432365da9ee08a0c2 to your computer and use it in GitHub Desktop.
WSL Backup #wsl #windows #linux #backup #tar
#!/bin/bash
#
cd /
tar -cvpzf /mnt/d/backup.tar.gz \
--exclude=/backup.tar.gz \
--exclude=/proc \
--exclude=/tmp \
--exclude=/mnt \
--exclude=/dev \
--exclude=/sys \
--exclude=/run \
--exclude=/media \
--exclude=/var/log \
--exclude=/var/cache/apt/archives \
--exclude=/usr/src/linux-headers* \
--exclude=/home/*/.gvfs \
--exclude=/home/*/.cache \
--exclude=/home/*/.npm \
--exclude=/home/*/.local/share/Trash /
# https://help.ubuntu.com/community/BackupYourSystem/TAR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment