Skip to content

Backup to Yandex disk with configuring storage days. Stores daily, monthly and annual backups.

License

Notifications You must be signed in to change notification settings

nickbeam/backupToYandexDisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yaDisk Backup script

Script for backup files to Yandex Disk.

Script usage YaDisk. Is a Yandex.Disk REST API client library YaDisk library

To get your access_token:

  1. Register your app at Yandex
    1. Be sure to check 'Yandex.Disk permits'
    2. Be sure to check 'Client for development' (it will set https://oauth.yandex.ru/verification_code?dev=True as Callback URI)
  2. Get access token https://oauth.yandex.ru/authorize?response_type=token&client_id=YOUR_APP_ID
  3. Get your access token from redirect url (right from the browser, it will be one of parameters)

Installation

  1. Download & Install Python 3.12 Download Python
  2. Install yadisk lib: pip install yadisk
  3. Install yadisk lib: pip install requests

Usage:

python ./yaDisk_sync.py [-h] [-d DAYS] [-r] token source destination

positional arguments:
  token                 Access token
  source                Source path
  destination           Destination path

options:
  -h, --help            show this help message and exit
  -d DAYS, --days DAYS  Lifetime daily backups, days count (int) (Default 45)
  -r, --recursive       Recursive upload files

Examples

Windows

python .\yaDisk_sync.py "token" "C:\\Backup" "backup" -d 14

Linux

python ./yaDisk_sync.py "token" "/home/user/Backup" "backup" -d 14

About

Backup to Yandex disk with configuring storage days. Stores daily, monthly and annual backups.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages