SHARE
TWEET

Untitled

a guest Jul 16th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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('* * * Создание резервной копии завершено * * *')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top