Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.
Tiger Sachse edited this page Aug 5, 2017 · 15 revisions

Follow these instructions exactly and in order if you want to program to function properly. Feel free to leave feedback or make suggestions on making the setup process easier/faster.

Installation

Arch Linux:
Viento can be found in the AUR by following this link! To install, make sure you've read through the Arch Linux wiki page on how to install packages from the AUR. You'll need to have the base-devel group installed (for tools like git and makepkg). In short, run these commands inside a directory in your home folder where you'd like to save your AUR files (such as ~/AUR):

$ sudo pacman -S base-devel
$ git clone https://aur.archlinux.org/viento-git.git
$ cd viento-git
$ makepkg -si

Next, proceed to Rclone setup.

(Soon) PIP:
I plan to add PIP support by 0.7.0-beta. Hopefully PIP installation will cover any Linux users who are using other distributions that I don't yet have plans to cover.

(Soon) Fedora:
I plan to add Fedora support by 0.7.0-beta. At this time, give manual installation a shot!

(Soon) Ubuntu:
I plan to add Ubuntu support by 0.7.0-beta. At this time, give manual installation a shot!

Manual Installation:
NOTE: If your system does not use systemd then Viento will not function properly, as Viento is a systemd-reliant daemon. Most major Linux distributions use systemd, so you're probably fine, but if you're unsure, do a quick search online.

Only install this way if I have not yet added support for your distribution and you cannot install through pip. Before you start, make sure you have Python 3.6, termcolor, and Rclone properly installed. I highly recommend installing these through your distribution's package manager rather than trying to manually install them.

To begin, change to a directory where you'd like to download the setup files (like ~/tmp) and then execute these commands:

$ git clone https://github.com/tgsachse/viento.git
$ cd viento

Now you have all the necessary files in a directory named viento. To grant execute permissions to all .py files:

$ chmod +x viento viento_daemon.py viento_setup.py viento_utils.py

Next you will move the 4 included .py files to their final location. The first file, named viento with no file extension, must be moved to /usr/bin. The remaining 3 files, viento_daemon.py, viento_setup.py, and viento_utils.py all have to be sent to your Python install's site-packages folder. Execute the following commands to move everything (these use site-packages's default location, however this location could be different for you if you have a weird python setup:

$ sudo mv viento /usr/bin
$ sudo mv viento_daemon.py /usr/lib/python3.6/site-packages
$ sudo mv viento_setup.py /usr/lib/python3.6/site-packages
$ sudo mv viento_utils.py /usr/lib/python3.6/site-packages

Feel free to delete the viento directory that you made when you ran the git clone command. Next, proceed to Rclone setup.

Rclone Setup

To setup Rclone you must run:

$ rclone setup  

and create a 'remote' specific to the cloud storage system you wish to use with Viento (you can do this multiple times for multiple cloud storage systems). When you run the setup an interactive prompt will appear in your terminal to help you set up a remote. The requirements are different for each remote so click the link below for the cloud storage system you wish to setup:

All of these examples provided on the Rclone site produce a 'remote' named 'remote', however the remote can be named anything you'd like. You'll probably want to keep it's name short and sweet for display purposes in Viento's logs and the Viento setup utility. You may wish to name your Google Drive remote 'gd', for example.

Finally, proceed to Viento setup.

Viento Setup

NOTE: Viento does not work with remote directories if Rclone has not been set up with at least 1 remote. Follow the process in Rclone Setup above, or else you won't be able to send files to remote directories.

To setup Viento for the first time or make changes to the configuration, run:

$ viento setup

Viento uses 'drafts' to determine what files/directories to transfer, where, and when. A draft has 4 parts: its source, destination, interval, and method.

  • The source and destination are the paths for the files/directories that you wish to transfer with Viento. These must be absolute paths (e.g. ~/Documents is invalid. Use /home/tgsachse/Documents instead).
  • The interval is the desired amount of time, in minutes, between each transfer attempt.
  • The method is the type of Rclone transfer for the draft. 3 types are supported: sync, copy, and move.
    • 'Sync' makes the destination and the source identical, modifying only the destination. Files in the destination that no longer exist in source will be deleted.
    • 'Copy' duplicates new files from the source to the destination. Files deleted from source are not deleted in destination using this method.
    • 'Move' transfers files from source to destination. Files are afterwards removed from source.

To make a new draft, enter the 'new' command and then fill out the form asking for the draft's constituent parts. The following example uses /home/tgsachse/Backup Documents as the source and a Google Drive folder named Backup Docs as the destination. The absolute path for the destination is gd:Backup Docs, (more generally, the absolute path for any remote directory is 'remote_name:path/to/directories'). The interval is 180 minutes (3 hours) and the files will be copied from source to destination. Here's the example in the interactive prompt:

Enter a command. ('h' for help)
> n
Source (absolute path): /home/tgsachse/Backup Documents
Destination (absolute path): gd:Backup Docs
Interval (minutes): 180
Method (sync/copy/move): copy
Is this correct? (Y/n)
> y

Now that you've made a new draft, you must write your changes to the drafts file with the 'write' command. After writing you can quit the setup utility. Run these to finish:

Enter a command. ('h' for help)
> w
1 change saved to file.
Enter a command. ('h' for help)
> q
Are you sure you'd like to quit? (Y/n)
> y

If you'd like to enable the daemon to run at startup then enter this command:

$ viento enable

If the program prompts you to create a service file, enter 'y' to continue. This will create a service file for systemd, the program in charge of running Viento at boot. Now run this last command to start the daemon!

$ viento start

You can check the status of the daemon with:

$ viento status

You can also check the log files located in the .viento folder, which is in your home directory by default.

$ cd ~/.viento/logs
$ ls
$ vim log1.log

That's it! Check out Usage for complete explanations of everything else Viento can do.