lk/networking/rclone.md

80 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-01-16 18:20:39 +00:00
---
title: "rclone"
2022-01-26 22:35:07 +00:00
tags: [ "Documentation", "Networking" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
The manpage's 'Synopsis' provides a fast reference.
```
2020-01-02 00:04:35 +00:00
We'll assume a folder in Google Drive called 'test', and local folder called 'foo'.
Generate a config file with:
```bash
rclone config
```
2020-01-02 00:04:35 +00:00
Look at the contents of Google Drive:
```bash
rclone ls gd:/
```
2020-01-02 00:04:35 +00:00
If rclone loses authorization:
```bash
rclone authorization
```
2020-01-02 00:04:35 +00:00
List only directories:
```bash
rclone lsf -dirs-only google:/
```
2020-01-02 00:04:35 +00:00
Mount the remote location on /tmp/google with:
```bash
rclone mount google /tmp/google
```
2020-01-02 00:04:35 +00:00
Copy the contents of 'foo' to 'test'.
```bash
rclone copy foo/ google:test
```
2020-01-02 00:04:35 +00:00
Sync contents of foo and test with a progress bar (will delete Google items):
```bash
rclone sync foo google:test -P
```
2020-01-02 00:04:35 +00:00
Remove all duplicates
```bash
rclone dedupe google:test
```
2020-01-02 00:04:35 +00:00
Delete contets of a remote file:
```bash
rclone delete n:test
```
2020-01-02 00:04:35 +00:00
Or delete the folder and contents as well:
```bash
rclone purge n:test
```
2020-01-02 00:04:35 +00:00
Copy to and from with:
```bash
rclone copyto google:test foo
```
2020-01-02 00:04:35 +00:00
or
```bash
rclone copyto foo google:test