Skip to content

Instantly share code, notes, and snippets.

@yzaguirre
Last active December 24, 2015 10:29
Show Gist options
  • Save yzaguirre/6785004 to your computer and use it in GitHub Desktop.
Save yzaguirre/6785004 to your computer and use it in GitHub Desktop.
Crea un .tar.gz de una carpeta como respaldo
#!/bin/bash
# idea http://jstr.se/archives/bash-backup-script-using-tar/
# instalacion:
# $ mkdir ~/bin ~/backup
# $ vim ~/bin/backupP3
# $ chmod u+x ~/bin/backupP3
# uso:
# $ backupP3 "dhcp funcionando"
cd ~/gns3/Projects # donde se ubican proyectos gns3
filename=P3Redes2_`date +'%d-%m-%Y_%H.%M.%S'`\ $1.tar.gz
tar czf "$filename" P3/ # P3 es el nombre de la carpeta de proyecto gns3
mv "$filename" ~/backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment