In this tutorial shows how to backup your home directory to a remote drive along with a list of sources and installed packages.There’s also a GUI tool that make backups to remote host.
First,open a terminal window and type this command:
sudo aptitude install smbclient smbfs
Configure your network drive properly and make sure you can connect to it. Also record the IP Address of the network disk.
Create the mountpoint for the backup drive by this command:
sudo mkdir /media/backup
Create a shell script by this command:
gedit network_backup
and paste following code,then save it.
#!/bin/bash cd yes "your password here" | sudo -S cp /etc/apt/sources.list . dpkg --get-selections > installed-software yes "your password here" | sudo -S smbmount //IP address/share name /media/backup -o username=network_username,password=network_password,uid=1000,mask=000 rsync -arquz --exclude=Music --exclude=Videos --exclude=Pictures --exclude=Dropbox --exclude=Examples --exclude=.VirtualBox --exclude=.beagle --exclude=.cache --exclude=.icons --exclude=.evolution --exclude=Skype\ Calls --exclude=tabla\ lessons --exclude=.thumbnails --delete /home/your_username_here /media/backup/ yes "your password here" | sudo -S smbumount /media/backup exit
Replace the bolded items only with appropriate values. For the rsync options,just change which paths you want excluded.
Now,make this script executable:
sudo chmod +x network_backup
and start backup by:
./network_backup
You can install Scheduled Tasks,and schedule this backup script to run however often you wish.
sudo aptitude install gnome-schedule
original text from here.