Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import shutil
  2. import datetime
  3. import os
  4.  
  5. date = datetime.datetime.now().strftime("%d-%B-%Y-%H-%M")
  6. output = os.path.join(os.path.expanduser('~'), 'Yandex.Disk', 'backups', 'example.com', 'www', 'example-www-backup-'+date)
  7. files = os.path.join(os.path.expanduser('~'), 'apps', 'example.com')
  8. print('* * * Приступаем к созданию резервной копии * * *')
  9. shutil.make_archive(output, 'gztar', files)
  10. print('* * * Создание резервной копии завершено * * *')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement