Network backup

From FreekiWiki
Revision as of 14:33, 29 September 2010 by Evilgold (talk | contribs)
Jump to navigation Jump to search

You will need to be on a wired connection for this to work

To backup a persons home folder(s) over the network using scp

scp -r /home/ tsbackup@192.168.2.143:/var/tsbackup/[date - persons name]

replace [date - persons name] with the appropriate information

To restore do the opposite (as root)

scp -r tsbackup@192.168.2.143:/var/tsbackup/[date-name] /home/ 

If you have reinstalled and the user had accounts other then oem you will still need to recreate those user accounts:

adduser [username]

You might also need to apply proper permissions

find /home/username/ -type f -exec chgrp -r username {} \; 
find /home/username/ -type f -exec chown -r username {} \; 
find /home/username/ -type f -exec chmod 644 {} \;
find /home/username/ -type d -exec chmod 754 {} \;

or for move private users

find /home/username/ -type f -exec chgrp -r username {} \; 
find /home/username/ -type f -exec chown -r username {} \;  
find ./ -type f -exec chmod 640 {} \;
find ./ -type d -exec chmod 750 {} \;

When you are finished with a backup and sure that all the data is properly transfered remove it from Cactus2

rm -r /var/tsbackup/[date-name]