Wednesday, April 24, 2013

How to Synchronize Your Configuration Files with Ubuntu One


Ubuntu One lets you easily synchronize files and folders, but it isn’t clear how to sync configuration files. Using Ubuntu One’s folder synchronization options or some symbolic links, you can synchronize configuration files across all your computers.
The same method should work with other cloud storage synchronization programs, including Dropbox. It also creates an online backup of your important files, so it’s useful even if you don’t have multiple Ubuntu systems.

Ubuntu One Setup

If you haven’t set up Ubuntu One yet, you’ll have to set it up before synchronizing files. Click the mail icon on the panel and select “Ubuntu One.”

Click the “Join Now” button and create an account.

On your other computers, click the “I already have an account!” link and sign in with your existing account.
After you do this, you’ll get a “Ubuntu One” folder in your home folder. All files in this folder are automatically synchronized between your computers.

Synchronizing Configuration Folders

Configuration folders are hidden by default, so you’ll have to click the View menu in the file manager and select “Show Hidden Files” to see them.

Once you have, you’ll see your configuration files. Each begins with a . — this is how files and folders are hidden on Linux.

Right-click the folder you want to synchronize, point to the Ubuntu One submenu and click “Synchronize This Folder.”

A green check mark appears on each folder you’re synchronizing.

From the Ubuntu One window, you can view all your synchronized folders.

Before the folder will synchronize, you’ll have to open the Ubuntu One configuration window on your other computers.

You must enable the “Sync locally?” check box on each other computer.

Ubuntu One will keep the configuration folder in sync across all your computers.

Of course, you can use this method to synchronize any folder.

Synchronizing Individual Files

Ubuntu One won’t let you synchronize a single file from the right-click menu. If you try, you’ll see all the options grayed out.

To synchronize a specific configuration file, you’ll have to move it to your Ubuntu One folder. You can do this with the cut and paste option from the file manager or with the mv command in the terminal.
Here, we’ve moved our .bashrc file to the Ubuntu One folder. It no longer exists in our home folder.

We can use the ln -s command to create a symbolic link from the file in the Ubuntu One directory to the file’s original location. For our .bashrc example, we’d use the following command:
ln -s /home/howtogeek/Ubuntu\ One/.bashrc /home/howtogeek
In other words, the syntax is:
ln -s /path/to/file /original/location
Note that you can’t create a symlink and place it in the Ubuntu One directory. Ubuntu One ignores symlinks.

If you check your home folder after this, you’ll see that there’s now a symbolic link to the file in the Ubuntu One folder.

On your other computers, you’ll have to delete the original configuration file and run the same command to create the appropriate symlink.

You can use this method to synchronize any file at any location. Most of the time it will make more sense to copy the file to the Ubuntu One folder, though.

No comments:

Post a Comment