Created
February 7, 2021 11:56
-
-
Save AlexKratky/b6547f6df4ac517b06893e9ef0138f53 to your computer and use it in GitHub Desktop.
backup whole server to .tar.gz file without .node_modules/ and vendor/ directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd / | |
# backup.tar.gz is the file name and we exclude that file from backuping (recursion) | |
# the ending slash is the directory you going to backup ( '/' is whole filesystem) | |
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude="node_modules" --exclude="vendor" --exclude=/swapfile --one-file-system / | |
# more info at 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