# Quick Start
in the `/opt/kagome-snapshots` of the stands you will find
- upload.py
- upload.sh (wrapper for upload.py that takes care of dependencies)
- private-key.json
- add flag -s to apply operations to Kamil's personal drive with more space
to upload
```
./upload.sh --name name-to-be-shown.zip --path path/of/file.zip
```
to upload to Kamil's personal drive
```
./upload.sh --shared --name name-to-be-shown.zip --path path/of/file.zip
```
After uploading, the command to download can be found in a `download_url_....txt` file or in the termimal
to see Drive's content and space:
```
root@ubuntu:/opt/kagome-snapshots#./upload.sh -s -l
Checking required tools
Checking required files
Checking Python version
Python version is less than 3.7.
Python 3.7 is already installed.
Installing pip dependencies
Managing virtual environment
Running upload.py
Name Type ID Size
--------------------------------------- ------ --------------------------------- ------
test.zip File 1aSnREPOUFUlpmIsKNUGXzTL0SoY_IXf- 1.2 MB
restrict-access-test.zip File 1iXoTeuTDNPcf6gUQJeeY6ffKa51DwMja 1.7 GB
23.09.25.zip File 15nNNahYLzb8drFNHN7kOKR8xAYxeZwpE 2.3 GB
23.09.25.zip File 1Ui2gSbikRzwsqJQlFnHThPLEQ2fKAjdI 1.7 GB
polkadot-node-1-snapshot-18-09-2023.zip File 1v81E9l96g5k4YdZSJkfNe29ZVAxy3TNu 9.0 GB
```
to see Kamil's Drive's content:
```
./upload.sh -l -s
```
to delete a file:
```
./upload.sh -d file-name
```
more:
```
./upload.sh -h
```
download (get file_id from ./upload.sh -s -l):
```
./upload.sh -g <file_id>
```
# Manual Set Up
## Seting Up Environment
Using python3.7 and above create and activate virtual environment
```
python3 -m venv venv
source venv/bin/activate
```
## Install The Necessary Packages
Required packages
```
google-auth
google-auth-httplib2
google-auth-oauthlib
google-api-python-client
oauth2client
google-cloud-storage
tqdm
```
Save the content above as requirements.txt and run the command below
```
pip3 install -r requirements.txt
```
## Uploading Files
Before continue:
- Make sure the file `private-key.json` is in the same folder as the file `upload.py`
- Make sure thas enough space, our account (at the time of writing this guid) has roughly 15Gb, one can see the content of files by `python3 upload.py -l` (use option -s to upload to personal drive that has more space)
- Proceed to delete the file with `python3 upload.py -d name-of-file` to make space or
- Upload the file with `-a`, `python3 upload.py ... -a` it will remove the oldest file
- Note that there is a bug that if the file to upload is greated than the available space in Drive it will make everything disapear (~~still in progress of fixing~~fixed)
Upload the the files
```
python3 upload.py -n name-of-file.zip -p ./path/of/file.zip
```