Backup2
From ITSwiki
Linux
echo "dtuInitials" > /tmp/remote_username wget -qO - http://www.student.dtu.dk/~mttj/rsync-backup/linux/install.sh | sh
Replace USERNAME
with your DTU initials.
ssh-keygen -q -t dsa -f ~/.ssh/id_dsa -P ssh-copy-id -i ~/.ssh/id_dsa.pub USERNAME@userbackup1.imm.dtu.dk sudo bash mkdir -p /opt/imm_rsync_backup/logs wget ... chmod 755 /opt/imm_rsync_backup/script.sh echo "USERNAME" > /opt/imm_rsync_backup/remote_username
Enter absolute directory paths that should be backed up in /opt/imm_rsync_backup/include
. One per line. Example:
/home /var/log /etc
Enter relative directory paths to your user-home that should be excluded from the backup in /opt/imm_rsync_backup/include
. One per line. Example:
lost+found temp project/test
Schedule the backup to be preformed. Here 9:15 is chosen, but it should be a time, where you know your computer is turned on.
echo " 15 9 * * * root /opt/imm_rsync_backup/script.sh" >> /etc/crontab service crond restart exit
OSX
Replace USERNAME
with your DTU initials.
ssh-keygen -t dsa cat ~/.ssh/id_dsa.pub | ssh USERNAME@userbackup1.imm.dtu.dk "mkdir -m700 .ssh ; cat - >> .ssh/authorized_keys"
Depending on your current ssh setup the mkdir may return "file exists" warning, this does not matter.