Saving Logs to a Cloud Storage Account - C0ntr07/Firewalla-Information GitHub Wiki

Rclone

Install rclone

curl https://rclone.org/install.sh | sudo bash

Configure rclone

sudo rclone config

Create a New remote n

Name the remote (if can be anything) googledrive

Select the cloud storage that is being used (Google Drive in this example) drive

In the case of using Google a client_id should be created. Use these instructions. Other cloud solutions will have other requirements.

Enter the client_id (use your specific value and not this one) 727511136497-8p10g03g9rmi3idokr6ii8ss86b0tdur.apps.googleusercontent.com

Enter the client_secret (use your specific value and not this one) tN2814yr3wnMs4uzARhemmM3

For the access scope select full access to all files. 1

ID of the root folder - press [Enter]

Service Account Credentials - press [Enter]

Edit advanced config Y

Only consider files owned by the authenticated user. Press [Enter]

Send files to the trash instead of deleting permanently. Press [Enter]

Skip Google documents in all listings. Press [Enter]

Skip MD5 checksum on Google photos and videos only. Press [Enter]

Only show files that are shared with me. Press [Enter]

Only show files that are in the trash. Press [Enter]

Comma separated list of preferred formats for downloading Google docs. Press [Enter]

Comma separated list of preferred formats for uploading Google docs. Press [Enter]

Allow the filetype to change when uploading Google docs (e.g. file.doc to file.docx). Press [Enter]

Size of listing chunk 100-1000. 0 to disable. Press [Enter]

Impersonate this user when using a service account. Press [Enter]

Use alternate export URLs for google documents export., Press [Enter]

Cutoff for switching to chunked upload Press [Enter]

Upload chunk size. Must a power of 2 >= 256k. Press [Enter]

Set to allow files which return cannotDownloadAbusiveFile to be downloaded. Press [Enter]

Keep new head revision of each file forever. Press [Enter]

If Object's are greater, use drive v2 API to download. Press [Enter]

Minimum time to sleep between API calls. Press [Enter]

Number of API calls to allow without sleeping. Press [Enter]

Allow server side operations (eg copy) to work across different drive configs. Press [Enter]

Disable drive using http2 Press [Enter]

Make upload limit errors be fatal Press [Enter]

If set skip shortcut files Press [Enter]

This sets the encoding for the backend. Press [Enter]

Remote config Use auto config? N

Enter the link into a browser; Log in and authorize rclone for access https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=711275136497-8p10i3idi8sokr6i03g9rs86b0tdur.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=aUwIf-jVeq8fFd7FjN2m1A Follow the prompts on the screen.

Enter the verification code (not this one) 4/3QECyc2V1gupXj3pyRSjo3AmD_wlwBdCfV-4lhlPG4BE8R19YCr2fJt

Configure this as a team drive? n

Review and confirm the settings and if correct Y

You are done q

Copying to the Cloud

pi@firewalla:~$ sudo rclone copy ~/logs googledrive:/Firewalla_Logs/

Use the rclone ls command to list the remote directory showing the copy was successful.

pi@firewalla:$ sudo rclone ls googledrive:/ 63352 Firewalla_Logs/FireMain20.log 959501 Firewalla_Logs/FireMon4.log 9103100 Firewalla_Logs/Trace.log 95493 Firewalla_Logs/FireApi2.log 1000106 Firewalla_Logs/FireMain19.log 1000083 Firewalla_Logs/FireMain18.log 1000048 Firewalla_Logs/FireMon3.log 1000018 Firewalla_Logs/FireMon2.log 1000018 Firewalla_Logs/FireApi1.log 645042 Firewalla_Logs/FireKick.log 327994 Firewalla_Logs/FireRouter1.log 21353 Firewalla_Logs/node.log 18528 Firewalla_Logs/FireMain81.log 880905 Firewalla_Logs/FireMon22.log 1002506 Firewalla_Logs/FireMain80.log 1000544 Firewalla_Logs/FireMain79.log 1000041 Firewalla_Logs/FireMon21.log 1000010 Firewalla_Logs/FireMon20.log 1000693 Firewalla_Logs/FireApi.log 874247 Firewalla_Logs/FireApi74.log 66705 Firewalla_Logs/Trace4.log 312629 Firewalla_Logs/FireMain132.log 436376 Firewalla_Logs/FireMon33.log 1001670 Firewalla_Logs/FireMain131.log 1000061 Firewalla_Logs/FireMain130.log 1000046 Firewalla_Logs/FireMon32.log 1000013 Firewalla_Logs/FireMon31.log 10000121 Firewalla_Logs/Trace3.log 1000032 Firewalla_Logs/FireApi73.log 1000727 Firewalla_Logs/FireApi72.log 10000025 Firewalla_Logs/Trace2.log 1000039 Firewalla_Logs/FireRouter.log pi@firewalla:$