Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # _ _
- # __ _| |_ __ (_)
- # / _` | | '_ \| |
- # | (_| | | |_) | |
- # \__, |_| .__/|_|
- # |___/ |_| _
- # / ___| __ _ _ ___ _____ __ _ __ _ _ __ __| | ___
- # \___ \ / _` | | | \ \ / / _ \/ _` |/ _` | '__/ _` |/ _ \
- # ___) | (_| | |_| |\ V / __/ (_| | (_| | | | (_| | __/
- # |____/ \__,_|\__,_| \_/ \___|\__, |\__,_|_| \__,_|\___|
- # |___/
- #
- import os
- import time
- #Variables
- ancien = "glpi.tar.gz"
- #Recuperation de la date
- madate = time.strftime('%d-%m-%y_%H:%M',time.localtime())
- #Concatenation du nouveau nom
- nouveau="glpi_"+madate+".tar.gz";
- #Creation de l'archive
- os.system("tar cvjf glpi.tar.gz glpi")
- #Renommage de l'archive
- os.renames(ancien,nouveau)
- print "Backup ---> [OK]"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement