Content from Using Rclone
Last updated on 2024-03-22 | Edit this page
Overview
Questions
- What is rclone?
- Why might you need to use this?
- How could rclone help you manage your data?
Objectives
- Be able to transfer data from the command line using rclone
- Know where to get help and examples
- [something else]
Introduction
Rclone is a command line program to manage files on cloud storage. After download and install, continue here to learn how to use it: Initial configuration, what the basic syntax looks like, describes the various subcommands, the various options, and more.
Challenge 1: What can you do with Rclone?
How do you think you might use rclone?
- For large files and/or multiple files rclone is efficient and fast
- Backup work
Rclone command syntax
rclone [command] source:source-folder destination:destination-folder
List of rclone commands: https://rclone.org/commands/
Key Points
- Use
.md
files for episodes when you want static content - Use
.Rmd
files for episodes when you need to generate output - Run
sandpaper::check_lesson()
to identify any issues with your lesson - Run
sandpaper::build_lesson()
to preview your lesson locally
Content from rclone config command
Last updated on 2024-03-26 | Edit this page
rclone config command:
Enter an interactive configuration session where you can setup new remotes and manage existing ones. You may also set or remove a password to protect your configuration.
rclone command flags
There are numerous command flags but these three are especially worth remembering:
- -n, –dry-run Do a trial run with no permanent changes
- -i, –interactive Enable interactive mode
- -v, –verbose count Print lots more stuff (repeat for more) - useful when debugging
References
Content from moving files around
Last updated on 2024-03-27 | Edit this page
moving files around
Rclone is most frequently used to move files, individually or as a group from one place to another.
The syntax for the places, to or from is:
source:folder destination:folder
or
local/path remote/path
valid remote names
Different operating systems have slightly different syntax
Windows syntax: rclone ls C: Linux syntax: rclone ls /mnt/c/Users/jjamison/rclone
Reference:
https://rclone.org/docs/#subcommands
Windows https://rclone.org/docs/#windows
Content from Creating Connections
Last updated on 2024-03-22 | Edit this page
{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)
Creating a connection
Reference
Content from copy-sync or-move
Last updated on 2024-03-27 | Edit this page
{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)
Move vs Copy vs Sync: what is the difference
[explain here]
Copy Copy files from source to dest, skipping identical files.
Copy the source to the destination. Does not transfer files that are identical on source and destination, testing by size and modification time or MD5SUM. Doesn’t delete files from the destination. If you want to also delete files from destination, to make it match source, use the sync command instead.
syntax: rclone copy source:sourcepath dest:destpath
Note that it is always the contents of the directory that is synced, not the directory itself. So when source:path is a directory, it’s the contents of source:path that are copied, not the directory name and contents.
To copy single files, use the copyto command instead.
If dest:path doesn’t exist, it is created and the source:path contents go there.
Sync Make source and dest identical, modifying destination only.
Sync the source to the destination, changing the destination only. Doesn’t transfer files that are identical on source and destination, testing by size and modification time or MD5SUM. Destination is updated to match source, including deleting files if necessary (except duplicate objects, see below). If you don’t want to delete files from destination, use the copy command instead.
rclone move command
Moves the contents of the source directory to the destination directory. Rclone will error if the source and destination overlap and the remote does not support a server-side directory move operation.
To move single files, use the moveto command instead.
##Important Note:## Since this can cause data loss, ##test first with the –dry-run or the –interactive/-i flag##.
Reference: https://rclone.org/commands/rclone_move/
Content from Getting Help
Last updated on 2024-03-22 | Edit this page
{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)
R Markdown
put in the syntax for getting help on a command