JottaCloud Install Guide

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
JottaCloud has a unlimited storage plan for $10 a month and they support FreeBSD, I thought it would be perfect on FreeNAS. I have been looking for a backup solution on FreeNAS for ages, can't believe I missed this one. Its pretty easy to setup as well.
Thanks to jinie on github for the rcscript and install guidelines.

https://www.jottacloud.com/en/

Create the iocage jail(Edit ip and router ip) :

Code:
iocage create -n jotta -r 12.2-RELEASE ip4_addr="vnet0|192.168.1.11/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"


Login to the jail:

Code:
iocage console jotta


Lets create the RC script:
Edit/create the file:

Code:
ee /jottad


Copy the contents below to that file:

Code:
#!/bin/sh
# PROVIDE: jottad
# REQUIRE: DAEMON
# KEYWORD: shutdown

. /etc/rc.subr

name=jottad
rcvar=jottad_enable

command="/usr/local/bin/${name}"
command_args="datadir /usr/local/etc/jottad &"
pidfile="/var/run/${name}.pid"

start_cmd="${name}_start"
stop_cmd="${name}_stop"

jottad_start()
{
    if [ -e ${pidfile} ];
    then
        echo "${name} is already running"
    else
        echo "Starting ${name}"
        /usr/sbin/daemon -p ${pidfile} ${command}
    fi
}

jottad_stop()
{
    if [ -e ${pidfile} ];
    then
        echo "Stopping ${name}"
        kill `cat ${pidfile}`;
        sleep 1
         else
        echo "${name} is not running"
    fi
}

load_rc_config $name
run_rc_command "$1"


Run the following commands to get it all setup:

Code:
pkg install -y mono sqlite3 ca_root_nss wget
cd / && wget https://repo.jotta.us/archives/freebsd/amd64/jotta-cli-0.10.42740_freebsd_amd64.tar.gz
tar -xvf jotta-cli*.tar.gz
cp /usr/bin/jottad /usr/local/bin/
cp /usr/bin/jotta-cli /usr/local/bin/
chmod +x  /usr/local/bin/jottad
chmod +x /usr/local/bin/jotta-cli
mkdir /usr/local/etc/jottad
mkdir /usr/local/etc/rc.d/
cp /jottad /usr/local/etc/rc.d/jottad
chmod u+x /usr/local/etc/rc.d/jottad
sysrc jottad_enable=YES
sed -i '' 's#Datadir=.*#Datadir=/usr/local/etc/jottad#' /etc/jottad/config.ini
echo "To start use service jottad start"



OK, ALL DONE!!
Start Jottacloud with

Code:
service jottad start


How to use it:

Start with creating a jotta account on their website, free or paid.
Login by using jotta-cli login
After logging in, to add a folder to backup use:
jotta-cli add 'path/to/file'
To remove a folder from the watch directory use
jotta-cli rem '/path/to/remove'

When in doubt about whats added, syncing etc use the command jotta-cli status
 
Last edited:

g3rt

Cadet
Joined
Mar 20, 2018
Messages
7
This will fail on 11.1 because libdl.so.1 won't be found. The current version mismatch and EOL of FBSD 11.1 is a mess. For anyone else coming looking, the solution here, for using 11.1 packages, worked well for me: https://forums.freenas.org/index.ph...libdl-so-1-not-found-error.70391/#post-486990

Great guide otherwise, it's nice to backup straight from the server, instead of from a windows box via a samba share, which was my previous "solution".
 

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
How to use it:

Start with creating a jotta account on their website, free or paid.
Login by using jotta-cli login
After logging in, to add a folder to backup use:
jotta-cli add 'path/to/file'
To remove a folder from the watch directory use
jotta-cli rem '/path/to/remove'

When in doubt about whats added, syncing etc use the command jotta-cli status

Awesome write up! Got it up and working and I think I am going to abandon Crashplan in my Ubuntu jail. It is crushing my swap mem and locking my system up.

Question -- when the server restarts, will this automatically continue backing up/restart the monitoring of the files to back up?
 

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
This will fail on 11.1 because libdl.so.1 won't be found. The current version mismatch and EOL of FBSD 11.1 is a mess. For anyone else coming looking, the solution here, for using 11.1 packages, worked well for me: https://forums.freenas.org/index.ph...libdl-so-1-not-found-error.70391/#post-486990

Great guide otherwise, it's nice to backup straight from the server, instead of from a windows box via a samba share, which was my previous "solution".

Thanks for linking that guide. It worked for me and I have it up and running now too.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Yep, if you follow all the instructions it will boot on reboot. I replaced my crashplan ubuntu with this as well, WAAAAYYY less of a resource hog.
However, I would say that the jotta-cli for freebsd is in very early stages and has crashed a bunch of times for me. The devs do not seem to care about fixing these issues as cli is more a niche case. Once everything initially scanned though it works well. There are definitely ways to consistently crash the app by doing mundane things like adding paths.
If jotta-cli status stops responding restart the jail.
If it doesn't crash after adding something after like 5 mins from my experience its pretty stable.
 
Last edited:

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
Yep, if you follow all the instructions it will boot on reboot. I replaced my crashplan ubuntu with this as well, WAAAAYYY less of a resource hog.
However, I would say that the jotta-cli for freebsd is in very early stages and has crashed a bunch of times for me. The devs do not seem to care about fixing these issues as cli is more a niche case. Once everything initially scanned though it works well. There are definitely ways to consistently crash the app by doing mundane things like adding paths.
If jotta-cli status stops responding restart the jail.
If it doesn't crash after adding something after like 5 mins from my experience its pretty stable.

So far it seems to be working well. It uploaded just over 100 GB's last night (40Mbps UL speed here :( ). I completely agree with you on the Crashplan comment. It was pushing my system in to swapspace failure within an hour or so ever time i turned it on. Hopefully Jotta doesn't ignore the FreeNAS community. There is a huge market for people with NAS's like this looking for a plan like this. Most use the Google plan because there is a loophole with it, but they can close that up any time they want and they are SOL.

Thanks for the insights, please share anything you you may find in the future with tricks or enhancements for it. It's much appreciated!
 

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
This will fail on 11.1 because libdl.so.1 won't be found. The current version mismatch and EOL of FBSD 11.1 is a mess. For anyone else coming looking, the solution here, for using 11.1 packages, worked well for me: https://forums.freenas.org/index.ph...libdl-so-1-not-found-error.70391/#post-486990

Great guide otherwise, it's nice to backup straight from the server, instead of from a windows box via a samba share, which was my previous "solution".

I went to update my plex server and ran "pkg upgrade && pkg update" and I got prompted about the allowing of the mismatch again. I aborted for fear of messing up Jotta. If i run the update and allow will i need to redo the stop from above after every time i do that (until it is properly fixed)? What is the proper way to run that without messing up Jotta?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
You can create another jail for plex, so regardless of what happens, jotta will be untouched. I would recommend installing 1 plugin per jail. That way if something messes up, it doesn't affect the rest of your plugins.
BUT, Jottacloud is installed completely manually, so nothing pkg does will break it. I would still recommend a new jail though
 
Last edited:

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
You can create another jail for plex, so regardless of what happens, jotta will be untouched. I would recommend installing 1 plugin per jail. That way if something messes up, it doesn't affect the rest of your plugins.
BUT, Jottacloud is installed completely manually, so nothing pkg does will break it. I would still recommend a new jail though

I do have Plex in its own jails (along with all my other jails). When I run the update at the main root, it where i get prompted for this.

Another question, did you setup any notifications? I am trying to get it working, but it's not for me.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
If its in its own jail, you dont need to worry about pkg breaking jotta. Your're good.
No I haven't setup notifications, never thought about it. What would you want to be notified about ?
Also no idea how to even start lol, if you show me steps you tried maybe I can help, but I dont have any personal experience with it.
 

jbrown705

Explorer
Joined
Sep 10, 2018
Messages
62
If its in its own jail, you don't need to worry about pkg breaking jotta. Your're good.
No I haven't setup notifications, never thought about it. What would you want to be notified about ?
Also no idea how to even start lol, if you show me steps you tried maybe I can help, but I don't have any personal experience with it.

There is one for a status I’d like to get once a week and another that tell you when it starts and stops. I most interested in the stops one just because with it running in the background it can easily be forgotten about and I hate for it stop and me not realize for weeks, know what I mean?


**UPDATE**
Nevermind I got it. ID 10 T error.
 
Last edited:

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Just an update, my jotta stopped working suddenly sometime around April I think ? The version we installed is to old now, I have updated the guide with the new version. To update first remove these 2 files
Code:
rm /usr/local/bin/jottad
and
Code:
 rm /usr/local/bin/jotta-cli

then run lines 2-5 from the "Run the following commands to get it all setup: " part of the guide and restart the jail, it should work. I would make a snapshot of the jail before just incase.

I also made a much better RC script based one one that @ByteNick posted for something else. So thanks to him. If you use the updated rc script (which you should) run this command first:
Code:
sed -i '' 's#Datadir=.*#Datadir=/usr/local/etc/jottad#' /etc/jottad/config.ini


I would highly recommend using the updated rc script as the old one could not shutdown the service and would cause the system to freeze if you tried.
 
Last edited:

ank0m

Cadet
Joined
May 23, 2019
Messages
8
Thanks for this fantastic instruction @gt2416, was searching for non expensive off-site backup solution and Jotta Cloud seams to be what I'm looking for.

Do you, or someone else, exceed the 5TB range and if, what is your upload speed?

Thanks again,
ank0m
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
Glad you got it working!
I have about 8tb backed up. I never got more than 5MB/ps and its usually about 2MB/ps. Its slow but I figure after you let it backup over a couple of days it doesn't really matter, so it works for me. I should mention I have a 1gig connection so its definitely not my bandwidth thats the bottleneck.
 

ank0m

Cadet
Joined
May 23, 2019
Messages
8
Thank you for answering my question. 2MB/s isn't really fast but I think it doesn't hurt as much most of the time, because there will only be a couple of GB (50 - 100) of new/changed data per day. So it's only hard for the initial backup.
 
Last edited:

ank0m

Cadet
Joined
May 23, 2019
Messages
8
Just for the logs:
right now I'm transfering (backing up) data to my Jottacloud with ~15MB/s! I'm located within the European Union, maybe that makes the transfer speed difference to yours @gt2416.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262

Valantar

Dabbler
Joined
Apr 11, 2021
Messages
26
Is this guide still current? As someone very new to TrueNAS and not overly familiar with command line interfaces I'm really grateful for the guide, though it would be nice to know if anything has changed since the update 2 years ago :)

Also, what does it mean that
jotta may come to ports
? Does this mean there is (or will be) an easier setup route?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
I have updated it, it should work !

? Does this mean there is (or will be) an easier setup route?

Yes sometime in the future there should be an easier way of installing it.
 

Valantar

Dabbler
Joined
Apr 11, 2021
Messages
26
I have updated it, it should work !



Yes sometime in the future there should be an easier way of installing it.
Excellent, thanks for putting in the work and sharing with everyone :) Guess I'll be making my first foray into the TrueNAS command line some time soon.

One question: using this guide, where do the files go? Into "Synced files", some device under "Backed up", or "Archive"? And can this be set/changed manually?
 
Top