Last active
December 24, 2015 10:29
-
-
Save yzaguirre/6785004 to your computer and use it in GitHub Desktop.
Crea un .tar.gz de una carpeta como respaldo
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
#!/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