Showing posts with label backups. Show all posts
Showing posts with label backups. Show all posts

Thursday, 1 September 2011

backing up - or not.

ive got a good system running for backing up windows machines .
I thought Id sort out the backing up of my  linux machine as well.
So i thought id do the same thing
  • create a shared folder on the remote system
  • make it accessible to the computer I want to back up . 
  • run rsnapshot and Im done 
But Im not done  .Both systems run linux , so it would be a nfs share.


on the server
root@server:/home/backup/mars/hourly.0/mars# ls -la /home/backup/ | grep ma
drwxrwxrwx  4 mars    users     4096 2011-09-01 14:27 mar
root@server:/home/backup/mars/hourly.0/mars#
 
 on the client
 mar@mar-desktop:/mnt$ mount | grep nfs
 192.168.2.20:/home/backup/mar on /mnt/marbackup type nfs 
 (rw,vers=4,addr=192.168.2.20,clientaddr=192.168.2.3)
 and i get this
 
 mars@mars-desktop:/mnt$ sudo rsnapshot  -c /etc/rsnapshot.conf  hourly
 require Lchown
 Lchown module loaded successfully
 Setting locale to POSIX "C"
 echo 6806 > /var/run/rsnapshot.pid
 mkdir -m 0755 -p /mnt/marsbackup/hourly.0/
 /usr/bin/rsync -avx --delete --numeric-ids --relative --delete-excluded \
     --temp-dir=/tmp --exclude=*iso --exclude=Dropbox/* --exclude=Ubuntu* \
     --exclude=.* --exclude=Downloads/* /home/mars \
     /mnt/marsbackup/hourly.0/mars/
 sending incremental file list
 created directory /mnt/marbackup/hourly.0/mars
 /home/
 rsync: chown "/mnt/marbackup/hourly.0/mar/home" failed: Remote I/O 
 error (121)
 /home/mars/
 rsync: chown "/mnt/marbackup/hourly.0/mar/home/mars" failed: Remote 
 I/O error (121)
 /home/mars/A4L Flyer (2up, 2x A5).ott
 /home/mars/Agenda_Committee Net Meeting_17_July_2011.pdf
 /home/mars/CTX.DAT
 
 etc
 on the server its this
 root@server:/home/backup/mar/hourly.0/mars/home/mar# ls -la
 total 1956
 drwx------ 21 nobody nogroup   4096 2011-09-01 14:38 .
 drwx------  3 nobody nogroup   4096 2011-06-04 15:27 ..
 -rw-------  1 nobody nogroup 113146 2011-08-26 13:40 a4flyer.jpg
 -rw-------  1 nobody nogroup   9955 2011-08-26 12:16 A4L Flyer (2up, 2x  A5).ott
 -rw-------  1 nobody nogroup  71243 2011-07-17 20:10 Agenda_Committee 
 Net Meeting_17_July_2011.pdf
 
 I can access the backed up stuff from the server , as root .
 
 but when i come to run the backup again
 it fails
 
 mars@mars-desktop:/mnt$ sudo rsnapshot  -c /etc/rsnapshot.conf  hourly
 require Lchown
 Lchown module loaded successfully
 Setting locale to POSIX "C"
 echo 6918 > /var/run/rsnapshot.pid
 native_cp_al("/mnt/marbackup/hourly.0", "/mnt/marbackup/hourly.1")
 mkdir("/mnt/marbackup/hourly.1", 0755)
 safe_chown(4294967294, 4294967294, "/mnt/marbackup/hourly.1")
 ----------------------------------------------------------------------------
 rsnapshot encountered an error! The program was invoked with these options:
 /usr/bin/rsnapshot -c /etc/rsnapshot.conf hourly
 ----------------------------------------------------------------------------
 ERROR: Warning! Could not safe_chown(4294967294, 4294967294, 
 "/mnt/marbackup/hourly.1");
 ERROR: Error! cp_al("/mnt/marbackup/hourly.0/", 
 "/mnt/marbackup/hourly.1/")
 /usr/bin/logger -i -p user.err -t rsnapshot /usr/bin/rsnapshot -c \
     /etc/rsnapshot.conf hourly: ERROR: Error! \
     cp_al("/mnt/marbackup/hourly.0/", "/mnt/marbackup/hourly.1/")
 rm -f /var/run/rsnapshot.pid
 mars@mars-desktop:/mnt$
the problem is the root_squash option in nfs . The defautl is root_squash - ie  stuff transferred across is owned by nobody, rather thatn user that can do stuff. 
 
So i changed the mount options to 
rw,no_root_squash, and added the same user (mar) to the server . 
But still not fixed.I think the UIDs have to be the same as well 
 
And the ssh option in rsnapshot looks like its a pull backup option rather than push. 
Hmmm . I'l have to have think about this 
 

 







Tuesday, 30 August 2011

backups - part1

There are 2 sorts of people - those who keep backups and those who have never had a computer system failure  when it contained important stuff . Ive now got a backup system that works reasonably well .
I use rsnapshot and have written a bash script  that automatically updates the server backups of a windows machine. but I haven't got off-site backups. Ive recently been subscribed to the livedrive backup system - I have unlimited  backup space !
The  backups I have are done with rsync, which is very efficient. My backup system keeps incremental backups , but links files that have stayed the smae, thus minimizing  the amount of stuff that gets sent over the wires.

ive spent a while trying to get curlftpsfs and rsyn working , so far to no avail.  I then cam across lftp , described as  a 'poor mans' rsync', so i gave that a go. Ive got config script that includes the stuff i want to back up, including the multiple copies created by rsnaphot. But there are a  couple of serious problems.

file transfer to livedrive
heres one problem - upload speed of 20K/s .
So stuff takes ages. And because you cant link files on livedrive, it transfers duplicate copies. it is taking over 24 hours to do a copy of what I want to backup.
So this is clearly impracticable.  What I'll have to do is go back to rsync and see what i can do , i try  lftp  with just the option of sending newer files to livedrive. it wont keep incremental backups that can be easily restored, but if i set it to not delete, it may keep copies  , but not versions, of svey file i want to backup.

I'll have to see how I get on

Tuesday, 2 August 2011

Vista , hide/unhide and read permissions

Ive just installed thunderbird as an email client. Straightforward, as these things go.

 The local folder location is buried deep in the thunderbird settings  its a subfolder of  the profile. I went looking for it - we have a network, and then offsite backup that runs regularly , and I wanted to sort out the backup whilst I was there. 
But the 'local folders' folder isn't visible by default. I assume windows will think that it will confuse you  by showing stuff you dont need.
How to make it visible , if you cant see it ?

I went to the root of the Users' folders , right clicked on the user and looked at properties -something like this




so I unchecked 'hidden'  and set it off - and the majority of the desktop icons ( well, all the important ones ) disappeared.  OK - id got something wrong . So how do you make it reappear when you cant see it.

Much clicking  and swearing and nothing I did restored it - not even the windows things of restarting the computer, and if that didnt work, switching it on and off at the wall.
.
I think I worked it out
To make the user folder visible again, it has to be set as read-only and then unhide. Once the computer has done its stuff , the desktop icons re-appear. But you get some really strange error messages because software need to write stuff to the disk when it start and if it cant do so , it will stumble.

  • OpenOffice - an unhelpful message about a run-time error
  • Dropbox - a mesage about a python error
  • Firefox - an error message about it not being able to write (ha ! a clue) security settings
so once the stuff is restored  you need to go through select folder removing the read-only
So far its been
  • Appdata
  • Documents
  • Downloads
  • Dropbox 
Im sure there will be others that i havent come across yet.
But sanity is restored, catastrophe averted,a s the system is up and running

Thank you , Bill Gates - NOT