Jottacloud CLI Configuration

Learn to configure Jottacloud CLI to suit your needs

Updated over a week ago

jotta-cli config

Jottacloud CLI comes with several settings you can toggle or tune. 

You can see a complete list of these settings and their values by calling:

> jotta-cli config get
downloadrate          : unlimited
uploadrate            : unlimited
checksumreadrate : 52.43MB/s
maxuploads : 2
maxdownloads : 2
scaninterval          : 1h0m0s
webhookstatusinterval : 6h0m0s
logscanignores        : false
slowmomode            : 0
logtransfers          : false
screenshotscapture    : false
photosmonthastext : true

The default settings are displayed above.  

Download, upload, and checksum read rate

Changes the bandwidth jottad  is allowed to consume when downloading/uploading. The units used to describe this should be fairly intuitive: 1m means 1Megabytes per second. 512k means 512 Kilobytes per second.  0 means unlimited.

The checksumming rate can also be set. It is limited by default to ensure the entire disk bandwidth is not used to checksum files in preparation for uploading. It can be set to unlimited if desired.

Max uploads and downloads

Allows the maximum allowed simultaneous uploads and downloads to be set. The lower bound is 1 and the upper bound is 6.

Scan interval

jottad scans each folder added to backup every scan interval.  

The units are:

h for hour 
m for minutes
s for seconds

They can be combined or used alone as  

jotta-cli config set scaninterval 30m
jotta-cli config set scaninterval 2h
jotta-cli config set scaninterval 1h30m

You can also set the scaninterval to 0. jottad will then run backups in realtime mode which uses triggers from the filesystem to determine what and when to perform backups.


Webhook status interval

If you have any webhooks configured jottad will post a status update to the webhook every webhook status interval. The units are as for scaninterval.

Log scan ignores 

jottad  will ignore some files when scanning. Either because jottad  ignores all such files or because you may have added your own ignore rules. Setting logscanignores to true will cause jottad  to write the reason for each file ignored to the logfile. You can use this to figure out why a particular file or folder was not updated.

Slowmo mode  

jottad  will by the default value of slomomode use all available cpu/harddrive resources when scanning. This can cause other processes to suffer. By setting slowmomode to a higher value scan will slow down a bit thus using less cpu/harddrive. The range of valid values is (0-50).

Log transfers 

jottad  by default only logs transfer errors. Setting this to true will cause jottad to write the result of all http requests related to upload/download to the logfile.

Photos month as text

When using ls and download it is possible to access the photos ordered by year and month as part of the path. Setting this to true ensures that all months appear as text, while setting it to false will display months as a number.

When set to true:

jotta-cli ls -l Photos/Timeline/2020
Name Size Checksum LastModified
--------- ---- -------- ------------
January
October
December
May
June
September

When set to false:

jotta-cli ls -l Photos/Timeline/2020
Name Size Checksum LastModified
---- ---- -------- ------------
1
10
12
5
6
9


Screenshot capture on MacOS 

Setting to true will cause jottad  to watch for any screenshots taken, upload them and generate a public url which i written to your clipboard. It can be very useful for quickly sharing screenshots with other people.

Screenshot capture linux

While not as straight forward as on MacOS, it is possible to do this on linux as well.

Although there exists many tools on linux for screenshot capture, we recommend using maim for the best experience

Install maim and xclip with your package manager:

apt install maim xclip # apt/dpkg based
yum install maim xclip # rpm based


With this script we will spawn main to select the parts of your desktop you want to screenshot and then upload the screenshot to Jottacloud and generate a public share URL for it:

#!/bin/bash

set -euo pipefail

FILE=$(mktemp -t "screenshot-XXXXXX.png")
maim -suq ${FILE}
jotta-cli archive ${FILE} --remote=Screenshots/$(basename ${FILE}) --share --clipboard --nogui
rm ${FILE}

Save the script to somewhere in path (like /usr/local/bin) and make it executable (chmod 755). When executed your cursor should change to a crosshair. Mark the area you want to screenshot and the URL to the screenshot will automatically be posted to your clipboard.

The uploaded screenshots will be put in your archive under Screenshots (the same location where MacOS puts them)

Config file

NB! From version 0.12, the config file is no longer in use, and all settings should be specified on the command line or through config set

In addition to the runtime config settings, additional settings can be set via the config file. These include setting the location of the persistent data, the address for jottad to listen to, and the location of jottad's log file.

The config file follows the ini format and controls some aspects of how jottad runs. An example config file is listed below. This config file changes the default datadir to /home/roland/.jottaddata, the address jottad listens on to 0.0.0.0, and the log file location to /var/log.

[settings]
; this changes the datadir
Datadir=/home/roland/.jottaddata
; this allows jottad to listen on all interfaces
ListenAddr=0.0.0.0
; this sets a custom logfile location
LogfileDir=/var/log


The config file might not exist, and if it doesn't you need to create it. The possible locations depending on your operating system are listed below. You can use the example file above as a template. Just remember to change or remove the Datadir item.

jottad looks for the config file in the following locations:

linux & freebsd:
/etc/jottad/config.ini

macos:
~/.config/jottad.ini

windows:
installdir\config.ini
(install dir is the same dir as the jottad.exe executable)
Did this answer your question?