Remote unattended backups Ubuntu

Status
Not open for further replies.

NJC

Joined
Apr 28, 2005
Messages
3,051
Location
Vancouver BC
I want to be able to perform unattended backups via SSH to my server using Ubuntu 9.04 (desktop and server). I've looked at sbackup and nssbackup. I'd prefer free if good solutions exist - otherwise willing to pay for a good product (Acronis et al).

What do you folks recommend.
 
Are you familiar with rsync or scripted sftp?

Both require a bit of tinkering, but are very good solutions.

Wayne
 
What do you mean by remote backup? You mean back up remote files to some local machine...or to another remote machine? If so, rsync isn't cutting it for you? There are commercial non-free products that behave similar to Acronis' product, but I've not had the need for one yet.
 
I mean remote as in my crawlspace where my Dell resides as a file server.
55.gif


Up to this point it has been copy/paste so I'm looking for a little more automation and sophistication. I haven't used rsync.
 
You can set up the backup using rsync; specifying which directories get backed up and what criteria are used to determine what gets transferred.

After you've got the rsync command worked out (there's a neat little Gnome GUI for rsync called grsync that's really handy in getting things set up. During a grsync operation, the actual rsync command will be displayed for you to copy and use without the GUI.), you can use a cron job to automate a schedule for which to use the rsync command.
 
Thanks guys, I'll get grsync. And will need to investigate cron since I've never used anything automated in Ubuntu. I need 3 lifetimes to learn all of this stuff.
crazy2.gif
 
There are an endless amount of tools to backup stuff in Linux.

For critical data files, I use tar & bzip are then copy them to a remote server using a date stamp as the file name. This way I have multiple archived full backups of the data. Hard drive space is cheap.

For Music and photos which take up a ton of space and are always changing, I used rsync between the servers.

Since you mention Acronis. If you are looking to back up images, take a look dd or one of the other imaging tools available.

The Cron syntax can be quirky, but once you learn the basics, it will cover 99% of your needs. Also, use variable in your backup scripts. It makes it much easier to recycle them in the future.
 
How to set the incremental flag? I ran a simulation and it seems to copy, but I don't want to (obviously) continually copy >40GB over every week.
 
Originally Posted By: NJC
How to set the incremental flag? I ran a simulation and it seems to copy, but I don't want to (obviously) continually copy >40GB over every week.


Pretty much 'rsync -av [source] [dest]'
-av is archive mode and will only copy your changes.

'man rsync' for all possible options.

Give it a try and continue to post any problems or questions, there are some pretty helpful UNIX folks on this board.
 
http://rsnapshot.org/

This uses rsync and perl to create full and incremental backups.

Each day it does an rsync, if the file already exists on the destination machine it creates a hard link to that file instead of making another copy. Consequently only 1 copy of the source filesystem and all the deltas are stored on the destination. I gives you the appearance of many copies of the data, but most copies are hard links to the identical file. Rsync alone can't do incrementals.
 
Last edited:
BackupPC is a good one too. Web enabled restore, uses much of the same concept as rsnapshot. Backs up W-doze machines too with the use of a cygwin library and a W32 rsync.
 
I tried the following:

Code:
rsync -av -n '/media/sda2/My Documents/' @192.168.1.101'/media/backup/My Documents/'

But it appears to copy all 50gb over in the test whereas it should only copy 1gb that has changed in a few weeks.
 
Originally Posted By: simple_gifts
You have to be careful about trailing slashes.

edit: where is the colon?

I've been looking through man rsync (doesn't make for light reading) about the trailing slashes.

Revised:
Code:
rsync -av -n '/media/sda2/My Documents/' @192.168.1.101:'/media/backup/My Documents'

Looks like it still is trying to copy entire directory though. More research needed...

sent 524351 bytes received 75330 bytes 17900.93 bytes/sec
total size is 50573306535 speedup is 84333.68 (DRY RUN)
 
Try

rsync -av -n '/media/sda2/My Documents' @192.168.1.101:'/media/backup'

If you put a "/" after "My Documents" (source) the result will be everything in the "My Documents" directory will show up in /media/backup but there will be no "My Documents" subdir

If you don't put a "/" after the source (as shown), it should make a "My Documents" in /media/backup. You need to leave "My Documents" off the dest. Give that a try
 
Last edited:
Thanks for your help simple_gifts. I ran the following into a test directory and although it appeared to be properly copying files without errors, nothing was transferred:

Code:
rsync -av '/media/sda2/My Documents/My Videos' @192.168.1.101:'/media/backup/test'

I'm getting this error:

Quote:
rsync: mkstemp "/media/backup/test/My Videos/." failed: Operation not permitted (1)

Client:
/dev/sda2 on /media/sda2 type vfat (rw,dmask=0000,fmask=0111)

Server:
/dev/sdb2 on /media/backup type vfat (rw,dmask=0000,fmask=0111)
 
Status
Not open for further replies.
Back
Top Bottom