amanda | CSIM Technical Notes

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