-
Start by creating a service account for your Google Cloud project.
-
Create a
.envfile in the same folder as this README, and paste in the following contents:DRIVE_BACKUP_FOLDER_ID='<folder ID>'
where
<folder ID>is replaced with the ID of the Google Drive folder you want to upload to. (Alternatively, this ID can be provided using the-ioption described below.) -
Install dev dependencies:
uv sync --group dev
-
To be able to run commands in the
Makefile:- If using Windows:
- Ensure that you have a program installed that can run makefiles.
This can be done by e.g. installing
GnuWin's Make using
WinGet:
winget install GnuWin32.Make
- Ensure that you have a program installed that can run makefiles.
This can be done by e.g. installing
GnuWin's Make using
WinGet:
- If using Linux/macOS: You don't need to do anything.
- If using Windows:
Run the following command to upload <filename> to the previously specified folder:
uv run backup_to_drive.py <filename>If using a Unix-based operating system (like Linux or macOS), the command can also be run like:
./backup_to_drive.py <filename>-i, --folder-id <Google Drive folder ID>- defaults toDRIVE_BACKUP_FOLDER_ID-p, --no-prefix- prevents prefixing a timestamped string to the uploaded file's name
Run:
make lint