March 2014 Archives

Tue Mar 25 11:28:57 ICT 2014

Transfer deleted accounts files to amanda

Move deleted user accounts files from banyan to amanda.
  1. On banyan check the total size of all the deleted files:
    sudo du -shc /home/*/deleted
    
  2. Login to amanda and become root.
  3. If there is not enough space to copy the old accounts to /deleted on amanda, we need to make space:
    find /deleted -mtime +400w -delete
    
    This will remove any file older than 400 weeks (about 8 years).
    Start with 400 weeks and reduce by 50 weeks until there is enough space available.
    Do the same for /host/localhost/ada7/home.
    Note: we cannot check the disk space abailable on /host/localhost/ada7 because it is shared with Amanda backups, so we must do the same delete as for /deleted. (We can check the size of everything that is not home of the disk ada7.)
  4. Delete ghost directories that have been left empty after removing older files:
    find /deleted -depth -type d -empty -delete
    
    Do the same for /host/localhost/ada7/home.
  5. Go to the disk ada7:
    cd /host/localhost/ada7
    
  6. Copy the deleted files from banyan:
    ssh on@banyan sudo -A tar cf - /home/\*/deleted | tar xfBp -
    
    On a non-graphic environment, you may use -S instead of -A but be aware that the password will show in clear on the screen.
  7. Go to the deleted directoriy on the system disk:
    cd /deleted
    
  8. Repeat the step 6.
  9. Login on banyan and become root.
  10. Go to the home directory:
    cd /home
    
  11. Remove the deleted account files:
    rm -rf */deleted/*
    

Posted by Olivier | Permanent link | File under: administration, backup

Thu Mar 6 17:42:56 ICT 2014

Upgrade FreeBSD source with subversion

The following steps are needed to upgrade FreeBSD sources using subversion.
  1. Install subversion from the ports.
  2. Run it once to create the proper environment:
    sudo svn checkout http://svn.FreeBSD.org/base/releng/9.2 /usr/src
    
    This will fail but create /root/.subversion
  3. Edit the file /root/.subversion/servers, in the section [global] add the following lines:
    http-proxy-host = 192.41.170.23
    http-proxy-port = 3128
    
  4. You can now update FreeBSD source, above steps will not be necessary anymore. The command is:
    sudo svn checkout http://svn.FreeBSD.org/base/releng/9.2 /usr/src
    

Posted by Olivier | Permanent link | File under: administration, freebsd