GoAdmio

installidrive

Download and install the IDrive for Linux backup client, replacing any existing installation

On this page: Overview · Quick start · Requirements · Syntax · Output · Examples · Troubleshooting · Details · See also


Overview

/go/installidrive installs the IDrive for Linux command-line client, a third-party online backup service. It:

The command only installs the program. You still have to sign in to your IDrive account and set up what to back up, using the idrive command and IDrive's own documentation.

[!WARNING] Running the command again deletes the whole existing IDrive installation first, including its profile (the sign-in and the backup set) and any data restored into its default restore folder. Copy restored data somewhere else before you run it.


Quick start

/go/installidrive

Requirements


Syntax

/go/installidrive

The command has no arguments or options. Any arguments are logged and ignored.


Output

The command prints the output of wget (the download progress) and of the installer. There is no success message of its own, and the exit code is the one of the last command.

After the installation you can check it with:

ls /opt/IDriveForLinux/bin/idrive

Logging

Every run is appended to /var/log/go/installidrive.log.


Examples

# Install IDrive for Linux
/go/installidrive
# Use it in a new shell, or reload the start-up file first
source ~/.bashrc
idrive --backup
# Or call the program directly
/opt/IDriveForLinux/bin/idrive --backup

The script's comments mention these idrive options: --backup, --restore, --scheduler, --speed-test, --terminate-job, and -e. See IDrive's documentation for what they do.


Troubleshooting

Symptom Likely cause Fix
idrive: command not found The shortcut is an alias in ~/.bashrc, which only new interactive Bash shells read. Run source ~/.bashrc, open a new shell, or use /opt/IDriveForLinux/bin/idrive.
The sign-in, backup set, or restored files are gone after running it again The old installation folder was deleted. Sign in and set up the backup again. Copy restored data out of the default restore folder first next time.
IDrive is missing after a failed run The old installation is deleted before the download starts, and the download or installer failed. Fix the cause (internet access, wget, permissions), then run the command again.
Scheduled IDrive backups stopped The command removes the IDrive entries from the crontab. Set up the schedule again, with the idrive command, after the installation.
Other cron jobs are gone crontab -l failed, so the crontab was replaced by an empty one. Restore the crontab from a backup, and see Notes for maintainers.
The installer didn't run, or an old version was installed A file idriveforlinux.bin from an interrupted run was left in the current folder, so the new download got another name. Delete idriveforlinux.bin* in the current folder, then run the command again.
The shortcut is missing for a user It was added to the .bashrc of the user who ran the command, for example root. Add it to the other user's .bashrc, or create a symbolic link in /usr/local/bin.

Details

What it does

  1. Logs the call.
  2. Deletes /opt/IDriveForLinux.
  3. Downloads https://www.idrivedownloads.com/downloads/linux/download-for-linux/linux-bin/idriveforlinux.bin into the current folder, and makes it executable.
  4. Runs the installer with --install, then deletes the downloaded file.
  5. Adds the line alias idrive="sudo /opt/IDriveForLinux/bin/idrive" to ~/.bashrc of the user who runs the command, if it isn't there yet.
  6. Removes every line that contains idrivecron from that user's crontab.

The alias line inside the script itself has no effect, because an alias lasts only as long as the script.

Restore folder

According to a comment in the script, the default restore folder is inside the installation folder: /opt/IDriveForLinux/idriveIt/user_profile/root/<account email>/Restore_Data. The folder is deleted every time the command runs.

flowchart TD
    A["installidrive"] --> B["Delete /opt/IDriveForLinux"]
    B --> C["Download the installer"]
    C --> D["Run it with --install"]
    D --> E["Add idrive alias to ~/.bashrc"]
    E --> F["Remove idrivecron lines from the crontab"]

Notes for maintainers

Issue Why it matters Suggested fix
/opt/IDriveForLinux is deleted before anything is downloaded A failed download leaves no IDrive at all, and the profile and restored data are lost. Download and check the installer first, keep the profile, or use IDrive's own upgrade.
The installer is run without any check Code from a download is run, normally as root. Verify a checksum or signature before running it.
The installer is downloaded to the current folder, and made executable for everyone A stale idriveforlinux.bin makes wget save the new file as .bin.1, and the old file is installed. Use mktemp -d, a mode of 700, and delete the file afterwards.
The wget result is not checked, and the installer runs without sudo while the download uses it Failures go unnoticed, and the user may lack write access. Check each step and run everything as root.
crontab -l | grep -v idrivecron | crontab - If crontab -l fails, the whole crontab is replaced with an empty one. It also removes the IDrive jobs the installer just added, and works on the crontab of whoever runs it. Write to a temporary file, install it only if crontab -l worked, and explain why the jobs are removed.
The shortcut is an alias in ~/.bashrc It works only for new interactive Bash shells of one user, and the alias in the script is useless. Create the link /usr/local/bin/idrive.
The default restore folder is inside the installation folder A reinstall deletes restored data. Set the restore path elsewhere.
A comment contains an account's email address in a path Account-specific data in the script. Use a placeholder.
No success message and no check that the program exists A failed installation looks like a success. Test for /opt/IDriveForLinux/bin/idrive at the end.

See also

Command Description
backup Create a backup for all GoAdmio accounts (local and remote)
snapshot Restic-based per-domain snapshot backup and restore
maria Incremental MariaDB backup to S3 or via Rclone
s3 Mount an S3 bucket on a GoAdmio server
storage Auto-mount the /storage folder on boot using rclone
cron Set up main cron jobs in GoAdmio