Skip to content

Instantly share code, notes, and snippets.

@ffabreti
Last active August 29, 2015 14:03
Show Gist options
  • Save ffabreti/d6b752483a9bd239fdcb to your computer and use it in GitHub Desktop.
Save ffabreti/d6b752483a9bd239fdcb to your computer and use it in GitHub Desktop.
##### TAR #####
cd /root/projects
tar -cvpzf /root/projects.tar.gz --exclude=./sfitx ./
c - create a new backup archive.
v - verbose mode, tar will print what it's doing to the screen.
p - preserves the permissions of the files put in the archive for restoration later.
z - compress the backup file with 'gzip' to make it smaller.
f <filename> - specifies where to store the backup
--exclude=/example/path - The options following this model instruct tar what directories NOT to backup.
--one-file-system - Do not include files on a different filesystem.
#### SCP ####
scp root@192.168.1.1:/root/projects-20140715.tar.gz ./
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment