Coder Social home page Coder Social logo

idrive-docker's Introduction

idrive-docker

Run IDrive Linux Client in a docker container

GitHub: https://github.com/snorre-k/idrive-docker

Requirements

  • Docker installed
  • optional: docker-compose
  • IDrive account

Build image

docker build -t idrive-docker:latest .

Image is tagged idrive-docker:latest. The image is also available on Dockerhub and GHCR

  • snorre0815/idrive-docker:latest
  • ghcr.io/snorre-k/idrive-docker:latest

Run container with docker

docker volume create idrive
docker run --rm -d --name idrive -v idrive:/opt/IDriveForLinux/idriveIt \
           -v /path/to/backup:/source/1:ro -e TZ="Etc/UTC" \
           snorre0815/idrive-docker:latest

Data to be backuped should be located in /path/to/backup. It is mapped to /sources/1 inside the container. You can specify more mappings like this to backup different folders (e.g.: -v /path/to/anotherbackup:/source/2). In the IDrive backup configuration you then only have to specify /source as backup source.

Run with docker-compose - docker-compose.yml

docker-compose build idrive
docker-compose up -d idrive

Tasks after first start

You have to login to your IDrive account after first start.

docker exec -it idrive ./idrive --account-setting

Now you login and specify the basic settings. For me this worked best:

  • Create new Backup Location
  • Enter your Backup Location - enter a name - do no keep empty
  • Do you want to login as ...: y - otherwise you have to login again afterwords with ./drive --login or ./drive --account-setting

For more information and additional ./idrive parameters have a look at the IDrive documentation. The login and settings are stored persistent in the volume.

Backup configuration

The configuration and operation of backup and restore can be done in the IDrive GUI. Help can be found on the IDrive FAQs for Linux.

Migration from IDrive version 2.x

If you had the old version 2.x (latest was 2.38) running, you have to migrate the configuration to the new 3.x version. To do this, first you have to use the new image and then run docker exec -it idrive ./idrive --account-setting.

WARNING: Please take a note on your schedules, as they will be deleted in the next steps.

  • Login
  • Linux user "root" is already having an active script setup with path "/IDriveForLinux/scripts/Idrivelib/lib/dashboard.pl". Configuring the same user profile with current path will terminate and delete all the existing scheduled jobs. Do you want to continue (y/n)?: y
  • Backup content and definitions will keep, but you have to recreate your schedules.
  • If you have set your restore location to be beneath /IDriveForLinux you also have to adapt this, as IDrive is now located in /opt/IDriveForLinux.

Timezone

Be advised, that the containers timezone is UTC and so are the backup times and the log entries. Adapt the TC environment variable to your timezone to have local time in place.

idrive-docker's People

Contributors

snorre-k avatar

Stargazers

hammy275 avatar  avatar  avatar Martin Bradley avatar

Watchers

Martin Bradley avatar  avatar

Forkers

codinandhaulin

idrive-docker's Issues

TimeZone Configuration

Hello -- Thank you and great work on putting this container together with the iDrive for Linux version 3.x binary. I wanted to share my method to effectively sync Datetime and Time Zone with the Host using the following volume mappings:

-v /etc/timezone:/etc/timezone:ro
-v /etc/localtime:/etc/localtime:ro
-v /usr/share/zoneinfo:/usr/share/zoneinfo:ro

In a future revision, it would be great to implement a TZ variable to allow setting Datetime and Time Zone.

Thank you for your consideration. Again, fantastic work!

TimeDate Issue following implementation of TZ variable

I also wanted to note, as I mentioned previously of the volume mappings needed before you implemented the TZ variable. I have noticed that although the container appears to display the correct time for the timezone when executing the date command. I noticed that the post backup reports received from iDrive are once again in UTC whereas with the three (3) volume mappings to sync the timezone these same reports showed time in assigned timezone.

See below:

image

image

As shown in the 2nd image, the scheduled time shows correctly, but the Start and End times are in UTC.

The only difference being I removed the volume mappings I'd added to correct the timezone without the TZ variable and pulled the new image that uses TZ.

Update to latest IDrive?

Your docker is the only one that has worked for me on Unraid. Could you rebuild with the latest IDrive bits?

Unraid Docker Template

          I also wanted to add that I created the following template for anyone using this container on Unraid (https://unraid.net/):
<?xml version="1.0"?>
<Container version="2">
  <Name>iDrive</Name>
  <Repository>snorre0815/idrive-docker</Repository>
  <Registry>https://hub.docker.com/r/snorre0815/idrive-docker</Registry>
  <Network>bridge</Network>
  <Shell>bash</Shell>
  <Privileged>false</Privileged>
  <Support/>
  <Project/>
  <Overview/>
  <Category/>
  <WebUI/>
  <TemplateURL/>
  <Icon>https://static.idriveonlinebackup.com/source/images/favicon.ico</Icon>
  <ExtraParams/>
  <PostArgs/>
  <DonateText/>
  <DonateLink/>
  <Requires/>
  <Config Name="Config" Target="/opt/IDriveForLinux/idriveIt" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/appdata/idrive/config</Config>
  <Config Name="Time Zone" Target="/etc/timezone" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/etc/timezone</Config>
  <Config Name="Set Time" Target="/etc/localtime" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/etc/localtime</Config>
  <Config Name="Zone Info" Target="/usr/share/zoneinfo" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/usr/share/zoneinfo</Config>
  <Config Name="Backup Path" Target="/home/backup" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user</Config>
</Container>

Originally posted by @cybermac72 in #3 (comment)

Unable to find EVS commandline utilities

Thank you again for your responsiveness to previous issues identified. I wanted to share that a couple of users on a different forum have reported the following error upon pulling your docker container following the fix for the TZ variable:

image png a02e34591d87dc4a656104ba82ff92dc

I have been unable to replicate this issue as yet so I'm not sure how or why it happens but one occurrence can be explained away while two occurrences from separate individuals is a bit odd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.