-
-
Save msfidelis/5c150dac3014d6dd27ca to your computer and use it in GitHub Desktop.
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
#CONSTROI O ARQUIVO E PATH DE BACKUP E RETORNA | |
def gerabackup(): | |
date = (time.strftime("%Y-%m-%d")) | |
backupfile = '%s-backup-full.tar.gz' % date # Cria o nome do arquivo de Backup | |
pathdestino = '/mnt/hdbackup/%s' % backupfile # Destino onde será gravado o Backup | |
pathorigem = '/mnt/storage/' # pasta que será 'backupeada' | |
backup = 'tar cvf %s %s' % (pathdestino, pathorigem) # Comando de execução | |
return backup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment