Skip to content

Maintenance

Info

This section is applicable for cloud provider installations only. If you purchased Filesight as a managed installation we will take care of the platform maintenance and update as part of the managed service.

Software architecture

In order to better understand the components of the platform, we give some details about the underlying software components.

Filesight is made of the following components:

  • A Traefik instance used as entry point for web traffic, dynamically configured via a Redis store.
  • A storage backend, used to save files. Can be local disk or an S3-compatible bucket.
  • A PostgreSQL database, used for files organization (folder structure), files metadata and other information such as configuration, users, etc.
  • The Filesight application itself: API, frontend, and worker for long-running jobs such as storage migrations.
  • The updater daemon: that allows updating Filesight from the web interface.

You won't have to deal directly with these components. Instead, you will interact with them using the web interface or maintenance commands explained in the following sections.

Software updates

The Filesight web application can be updated directly from the web interface. The update can be performed by administrative users with the "System settings" permission.

Warning

Please note that this procedure will update the Filesight application, but the operating system where Filesight is hosted will normally not be updated. In order to keep your software secure, we recommend updating your cloud provider image with the following procedure once a new Filesight version is available.

Recovering from a failed update

We test our update procedures to minimize the probability of a failure during the process, but there could be some situations (such as power outages, network errors, or other external causes) when the update process could fail.

Our update procedure takes care of making a backup of the current version of Filesight before applying updates. This allows you to recover the last working version of Filesight in case of failure of the update process.

...

Info

If you could not restore the working installation after a software update using the described procedure, please contact our support for additional help.

Cloud provider images updates

As specified in the previous Software updates section, Filesight can be updated from the web interface, but the underlying operating system will not. We periodically release updates to images on the various cloud provider marketplaces in order to keep Filesight usable and secure.

Follow the procedure described here to update Filesight to the latest version available as image on your cloud provider.

01: New instance provisioning

Create a new Filesight instance by using the most recent image available in the cloud provider marketplace. The procedure is exactly the same as described in the Installation section.

02: Stop and backup existing instance

Connect to your existing instance in ssh and do the following operations:

  • put your existing installation in offline mode with filesight stop
  • export a database dump from your existing installation with filesight dump-db. Grab a copy of the file /srv/db_backups/backup.tar. You will need to copy this file to the new instance later, in the same path.
  • only if you are using "local" storage (see Storage configuration for more details): grab a copy of the folder /srv/data/django/media. You will need to copy this folder to the new instance later, in the same path.

03: Restore data on new instance

Connect to your new instance in ssh and perform the following operations:

  • Stop the Filesight application with filesight stop
  • Copy the /srv/db_backups/backup.tar file you have from step 2 and import the database dump to your new installation and load the database with filesight restore-db
  • only if you are using "local" storage: restore a copy of the folder /srv/data/django/media in the same position
  • temporarily disable HTTPS on the new installation with filesight disable-https

04: DNS setup

Go to your hosting/DNS management panel and configure your DNS to use the new installation public IP for the domain you were using previously.

For example, if Filesight was hosted at filesight.yourcompany.com you should update this record with the IP of your new instance.

Info

This part of the procedure might not be applicable if you use a load balancer or other hosts in front of your Filesight instance where you handle HTTPS termination. In this case, you should configure your load balancer to point at the new instance.

05: Start Filesight on new instance and restore https

Connect to your new instance in ssh and perform the following operations:

  • put your new installation in online mode with filesight start
  • once the DNS has propagated, navigate to your instance (will be in HTTP), log in with an administrative user (with credentials from your previous installation), navigate to system settings/HTTPS and enable HTTPS from the web interface.

06: Check new installation

At the end of this procedure you should access the new instance with your previous credentials and see the same content and configuration of your old instance. If everything seems OK, you can proceed and destroy your old instance using your cloud provider control panel or API.

See the next sections for references on maintenance commands.

Maintenance Commands reference

Filesight provides a set of commands accessible by shell for maintenance tasks.

To run these commands, connect to your instance in ssh.

Creating administrative user

The filesight init command lets you create your first administrative user.

Syntax:

filesight init

This is an interactive command that will ask you for information (email, password, name and surname) for creating an administrative user with full permissions. Once the user is created, you can log in at your instance address or IP with the credentials you specified.

Info

If you are configuring a new instance of Filesight from scratch you will need to run the filesight init command at least once to create an administrative user and proceed with the configuration and user creation on the web interface.

If you are updating to a new server image you probably won't have to run the init command, as you should be restoring a previous backup.

Dumping the database

filesight dump-db: Creates a dump of your database that you can archive for backup or use to restore Filesight contents to a new instance. Please note that this is only the dump for the database (users, files permissions and metadata) but not your actual files shared in Filesight.

Syntax:

filesight dump-db

After running the command, a dump of your database will be available at this position:

/srv/db_backups/backup.tar

Warning

If a previous backup was present in the specified destination path, it will be overwritten.

Warning

Ensure you have enough disk space before dumping your database.

Importing the database

filesight restore-db lets you restore a previous backup done with the filesight dump-db command.

Syntax:

filesight restore-db

The restore-db command has no arguments and requires that the backup to be restored is present at this location:

/srv/db_backups/backup.tar

Warning

After restoring a backup, all the Filesight configuration will reflect the one present in your backup, including users and passwords.

Start and stop the Filesight application

The filesight start and filesight stop commands allow you to stop the web application and API interfaces, so Filesight won't be usable from the web browser.

Syntax:

filesight start
filesight stop

Info

If navigating with a web browser to your instance shows a blank page with Bad Gateway message, your Filesight application is probably turned off. Try to restart it with the filesight start command.

Disabling https

The filesight disable-https command allows you to disable HTTPS support from the command line. When applied, the site won't respond to HTTPS protocol, but in HTTP only. This command may be useful in order to avoid failing DNS verifications from your certificate issuer, due to the fact that you are migrating your instance. In general, disabling HTTPS will avoid users trying to use your Filesight installation triggering a DNS challenge when the DNS is currently not pointing anymore to the domain they requested.

Syntax:

filesight disable-https

Warning

There is currently no counterpart of the filesight disable-https command that allows you to restore HTTPS mode from the command line. To do so, you should navigate to your instance in HTTP protocol, log in with an administrative user, and restore HTTPS in the settings/HTTPS section.