I’ve written guides on how to backup to both Dropbox.com and Box.com and now got the request via Twitter to write how to do the same thing with copy.com. Since I didn’t have a copy.com account I had to create one before I could look into it.
The installation guide found in the documentation only works “out of the box” if you have a GUI running and none of my servers have one.
These are the steps to install and configure a headless installation of the Copy.com
Installation
All of the commands are executed as root, I can not guarantee that it will work as a regular user.
Change directory to /tmp and download the installation files. The first time I tried to download the Copy.tgz file it failed with the error message:
1 |
ERROR: The certificate of `copy.com' is not trusted. |
To avoid this I added the parameter –no-check-certificate to the wget command
1 2 |
cd /tmp wget --no-check-certificate https://copy.com/install/linux/Copy.tgz |
Extract the files
1 |
tar -xvf Copy.tgz |
I then decided to copy the extracted folders and files to the /opt directory before running anything
1 |
cp -r copy /opt |
The CopyAgent (as copy.com calls their software) comes in both a 32-bit and a 64-bit version and you need to run the correct one.
If you don’t know if your VPS is 32 or 64-bit you can check it by executing
1 |
uname -m |
The results will then tell you that:
1 2 |
x86_64 ==> 64-bit kernel i686 ==> 32-bit kernel |
The server I’m testing this on is 32-bit so I change directory to the x86 directory
1 |
cd /opt/copy/x86 |
To create the config files you need to run the CopyConsole command with the following parameters
1 2 3 |
-p ==> the p parameter is where you enter your password -u ==> the u parameter is where you enter your username -r ==> -r is the root directory |
!UPDATE!
-r is the root of the folder you want to backup. if you set this to /home, all sub-directories in /home will be uploaded to your account.
A suggestion is to create a /backups folder and then symlink folders to that /backups folder.
it should look something like this :
1 |
./CopyConsole -p=<the password used when signing up> -u=<email used when signing up> -r=<root folder> |
When executing config files are created and a synchronization is made with your online copy.com account.
Wait until you see this text at the bottom of your terminal
1 |
All files up to date |
You can then exit by pressing CTRL+C
You will now have a new directory with all your config files in /root/.copy/.
The root directory that you specified above is now in sync with the online copy but if you add/remove a file in the root directory it won’t get uploaded since we stopped the CopyAgent.
To start syncing in the background you can start the CopyAgent with the parameter -daemon
1 |
./CopyConsole -daemon |
To make sure it gets started every time the VPS is restarted I’ve added this row as a cronjob
1 |
@reboot /opt/copy/x86/CopyConsole -daemon |
That’s it. all done!
15 comments for “Using copy.com as backup/sync destination”