Integrating network storage through the file manager

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Fully Synchronized

Special programs, such as Sitecopy [3], monitor files and compare the versions on the local computer to those on the server on demand.

If you add new files at one location, Sitecopy pushes them to the remote site. It then deletes unneeded files and updates modified files. The only condition is that you must have an addressable FTP or WebDAV server.

On Ubuntu, you just need to look for Sitecopy in the package manager and install the archive. The install is similar in other distributions. If, however, you fail to find Sitecopy in your distro's repositories, your only option is to build from the source code.

The tool expects to find its configuration in the hidden ~/.sitecopyrc file, which contains the server information (Listing 2). To synchronize more sites, add a new entry with a new name at the end of the file.

Listing 2

Server Information

site alicecat
  server www.alice.de
  protocol ftp
  username alice
  password topsecret
  local /home/alice/website/cats
  remote ~/cats

Any lines with a hashtag (#) are ignored. Otherwise, each line contains the name of a setting, followed by a space and the actual value. Line 2 contains the server address (or alternatively its IP address). The next line defines the protocol used in the data exchange. This is followed by the access credentials.

If an error occurs during the file transfer, or you lose the connection, Fetch mode helps you recover. The --fetch option first checks the server status, and --update eliminates any inconsistencies. For an overview of all the important commands, see Table 1.

Table 1

Sitecopy at a Glance

sitecopy --list <site name> Creates a list with all the differences between the local files and the files on the server.
sitecopy --fetch <site name> Fetches a list of the files stored on the server.
sitecopy --update <site name> Updates the files on the server.
sitecopy --synchronize <site name> Downloads files from the server to the local directory.
sitecopy --initialize <site name> Sitecopy assumes a previously unused server.
sitecopy --catchup <site name> Sitecopy assumes that the local copy is consistent with the one on the server.
sitecopy --allsites Updates all servers specified in the configuration file.

Because of a bug, syncing aborts with an error message if the remote site is nested several levels deep. You can easily call the command several times in succession, until the program has created all the levels correctly and begins to copy the files.

In addition to the configuration file, you can create a special directory with the mkdir ~/.sitecopy command. The tool uses it to save the most recent state of the files on the server. The documentation refers to this as the "Storage Directory."

Make sure that only you have access to the configuration file and the Storage Directory; otherwise, the program refuses to work.

To set the appropriate privileges, you can run the following commands:

$ chmod 600 .sitecopyrc
$ chmod 700 .sitecopy

Data transfer via FTP is unencrypted. If you need to transfer sensitive data, you will probably want to use an external WebDAV server that supports SSL.

To do so, just add the http secure line to your ~/.sitecopyrc file.

Conclusions

None of the mainstream Linux file managers today makes the mistake of ignoring standard network protocols. Dolphin on KDE and Thunar and Nautilus/Files on Xfce or Gnome provide a very convenient approach to working with data on remote systems, treating it as if it were stored locally on your computer. Gnome's GVFS proves particularly smart and useful. It transparently integrates network storage with your filesystem, so access is not limited to graphical tools and editors, but all your CLI tools can also process files on FTP and SSH servers.

Tip

GVFS transparently mounts web shares. You can go to /run/user/<uid>/gvfs/ftp:host=<example>.com/<path> to find your online files in a terminal window, too. This means you can use CLI tools such as ImageMagick, Exiftool, or the like directly on your network-stored data.

To jump directly to this directory, install the nautilus-open-terminal package, open the network drive, and then right-click on a free area in the file manager. The Open in terminal menu item then starts the terminal in the appropriate directory. More current versions of the Gnome file manager include this feature out the box.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Pydio is a free cloud solution

    Most cloud solutions for small networks are based on ownCloud or, less frequently, Seafile. Pydio is the third open source product trying to gain a foothold as a cloud solution.

  • Installing and testing Nextcloud

    Leading ownCloud developers, including the project founder Frank Karlitschek, became dissatisfied with the direction of the project, so they started Nextcloud, a fork of the code and a new company. The goal is to create a better balance among the company, clients, and users. We take a look at how Nextcloud is faring.

  • Twin-panel file managers

    Feel like you've outgrown Ubuntu's default file manager? Then you might want to try something different. This article covers some twin-panel file managers worth considering.

  • Convenient private cloud with Seafile

    After the Prism and Tempora revelations, the writing's on the wall: Your data stored on public clouds isn't safe from the clutches of security agencies. Help can come only from a self-administered solution – yet Seafile provides a simple and ingenious approach.

  • User accounts with OpenLDAP's central administration

    If you have multiple users logging into different computers or applications, the LDAP directory service can accommodate your needs