How to Synchronize a Linux Laptop
Synchronizing data between a laptop and a desktop doesn't have to be difficult in any operating system. There are a variety of synchronization services available that support Linux. For example, DropBox supports Windows, Mac and Linux. In 2009 Ubuntu One became available to meet the synchronization needs of Ubuntu Linux users. Native Linux programs, such as rsync, can synchronize files between computers. You can combine rsync with a script to synchronize multiple folders in one command.
Instructions
-
Setting Up Rsync
-
1
Share the directories on the desktop computer that you want to synchronize. Make sure to use NFS so they are accessible to rsync. Consult the manual for instructions on how to share directories in your Linux distribution. Nautilus users can right-click the folder and access the properties to share it. Do the same on the laptop.
-
2
Open a terminal and create the rsync script file:
gedit /home/myser/rsyncscript.sh
Replace "myser" with your home directory. This command creates the rsync script file and opens it for editing. You can use any plain text editor, not just gedit. Do the same on the laptop.
-
-
3
Add a line for each folder:
rsync -avz /home/myuser/folder computername:/home/myuser/folder
Replace "/myuser/folder" with the path to the folder you want to synchronize. Replace "computername" with the name of your desktop computer on the laptop configuration file. On the desktop configuration file, replace "computername" with the name of your laptop computer. Add one line for each folder being synchronized.
-
4
Save the file in both computers and exit the text editor.
-
5
Type the following command to make the script executable:
chmod 755 rsyncscript.sh
Without this command the script may not run on some systems. Run the command on both systems.
-
6
Type the following command to synchronize your laptop and desktop:
./rsyncscript.sh
This command will synchronize the folders you specified. The command can be run from either system. The rsync program will replace older files with newer ones.
Setting Up DropBox
-
7
Download the DropBox installation files. RPM and DEB files are provided for Fedora and Ubuntu. For other Linux systems, download the source and compile according to your operating system manual.
-
8
Double-click the installation file to open and install it using package manager. Click "OK" to restart Nautilus when prompted.
-
9
Run DropBox from the "Applications" menu, in the "Internet" folder.
-
10
Click "OK" and sign in or create an account.
-
11
Move the files you want to synchronize into the DropBox folder. Repeat these steps on the laptop and any other system with which you want to synchronize files.
-
1
Tips & Warnings
Ubuntu One is installed by default in Ubuntu 10.4 and later. Use the Ubuntu One Preferences option in your user menu, located in the upper right corner of the screen, to add folders to synchronize.