Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I sync /var/www folder with Ubuntu One?

I tried symlink with ln -s /var/www www in my ~/Ubuntu One folder and in ~/Documents (which is synchronized too), but it seems that it also doesn't work.

Of course I'm the owner of var/www and I (and my group) have all rights (771).

share|improve this question
2  
It seems U1 doesn't support symlinks at the moment: one.ubuntu.com/help/faq/… –  devius Nov 22 '11 at 21:36

5 Answers 5

up vote 1 down vote accepted

you could use rsync so synx those folders regularly The information will be duplicated but at least is a bit easier than copy pasting.

rsync /var/www /home/your_user/desired_folder

you can even make an automated script to run at certain time or just to be fired up with a quicker command

share|improve this answer
1  
OK, thank you :) P.s. It's should be rsync -l -r /var/www /home/user/destination –  sky Nov 22 '11 at 23:02

I also find different solution. We can use deja-backup program to synchronise backup which contains inter alia var/www folder ;)

share|improve this answer
    
+1 for ingenuity! ;) –  jrg Nov 29 '11 at 3:05

You can do the opposite and put a symlink to ~/Ubuntu One/www in /var and activate the FollowSymLinks option in your server configuration for the /var directory. This should work.

share|improve this answer
    
I'm not sure I can do this, because I have crypted home folder. However it's very good idea in other case :] –  sky Nov 22 '11 at 23:07

You can also use bind mounting to bind mount the folder under a folder which is synced with Ubuntu One.

share|improve this answer

Another way of solving the issue without having to duplicate files would be to simply change the location of the public files in Apache from var/www to a location in your home folder.

Simply look in: /etc/apache2/sites-available/default and change the DocumentRoot to a location in your documents folder, copy the contents of var/www into the new folder you created and set Ubuntu one to back up.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.