https://github.com/nickbeam/backuptoyandexdisk
Backup of files to Yandex disk with indication of days of storage and gradation by days, months, years.
https://github.com/nickbeam/backuptoyandexdisk
backup python yadisk yandex-disk
Last synced: about 2 months ago
JSON representation
Backup of files to Yandex disk with indication of days of storage and gradation by days, months, years.
- Host: GitHub
- URL: https://github.com/nickbeam/backuptoyandexdisk
- Owner: nickbeam
- License: mit
- Created: 2025-01-15T15:52:46.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-01-17T14:33:04.000Z (4 months ago)
- Last Synced: 2025-01-27T04:34:46.910Z (4 months ago)
- Topics: backup, python, yadisk, yandex-disk
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yaDisk Backup script
Script for backup files to Yandex Disk.
Script usage YaDisk. Is a Yandex.Disk REST API client library [YaDisk library](https://yadisk.readthedocs.io/en/latest/intro.html)
To get your `access_token`:
1. Register your app at [Yandex](https://oauth.yandex.ru/client/new)
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](https://www.python.org/downloads/)
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```
```commandline
positional arguments:
token Access token
source Source path
destination Destination pathoptions:
-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`