Monday 18 May 2009

Giving up on subversion for file backup

This morning I carried on trying to get subversion set up on my Ubuntu Virtual Machine so that I could backup files from Ubuntu to the Vista host using subversion.

I found a nice subversion tutorial that explained how to add files to your subversion repository. The first problem I had when doing this though, was that I would get an error message about not being able to read a .cache file or something similar, and then the import would stop. It didn't carry on and add all files it could read to the repository, just stopped.

So after some googling I found how to stop subversion from adding dot files to the repository. I had to edit /etc/subversion/config and add global-ignores = .*. This would mean that .htaccess files won't be added to the repository though, so I'd have to back them up manually.

I tried doing an import again, but got an error this time that it couldn't read a file due to read permssions, and again it stopped there and didn't finish the import. So I ran import again as a super user and it actually worked!

So I went back to the Vista host machine, and used TortoiseSvn to checkout the svn repository on the Ubuntu virtual machine. However, it got as far as a file that had a " character in the filename (illegal in Windows but okay in Linux), then stopped and didn't checkout any more files. It had also checked out all the deleted files as I had forgotten to exclude them.

So in Ubuntu I changed my filename that had a speech mark in it and also added *.*~ to the list of global ignores in /etc/subversion/config. I then tried to import the folder again, but got an error message that the file already exists. So it seems that to get this working for the purpose of backing up files, I would either need to:
  1. Checkout the repository to my working folder, then commit the folder whenever I want to do a backup.
  2. Delete the folder in the repository, then import it again each time I want to do a backup


I don't want to do 1) as I don't want the .svn folders in each of my working copy directories as it prevents me uploading my site easily to the webserver. Of course, if the webserver supported subversion or rsync it wouldn't be a problem, but I'm on shared hosting and don't think they have either of those services.

I don't want to do 2) as it's too much trouble - I might as well just backup the files to a USB mass storage device (which I think is what I will do for the moment).

After lunch I went on Animal Crossing for a bit. When I finished going on that I found it was all wet around the back of computer as I had left my bedroom window open and it had started raining while I was going on Animal. Luckily the comp still seemed to be working okay.

I did some more work on my photo website for the rest of the afternoon.

In the evening I watched an episode of The New Super Mario World and two episodes of The Tick Live Action with Maccy and Lad. After that I did a bit more website work, then took some photos in the garden from about 8.30pm-9.30pm, then watched a John Wayne film with Macager and Clare.

The weather today was a mixture of sun and clouds. It was very windy and rained heavily for a bit in the afternoon.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: 2x cheese on toasts with iceberg lettuce; apple; grapes; butterfly cake; cup o' tea.
Dinner: ½ breaded mozzarella; sausage roll; baked beans; mashed potato; tomato sauce stuff. Pudding was a strawberry yoghurt. Coffee; Dark chocolate digestive; ½ malted milk; ½ nice.

No comments: