#1  
Old 6th March 2006, 15:31
ovis ovis is offline
Junior Member
 
Join Date: Oct 2005
Posts: 28
Thanks: 0
Thanked 2 Times in 2 Posts
Default Rdiff-Backup

Hello,

Can anyone give me a practical example howto restore an directory in a typical setup as made in the rdiff-backup howto.

The man page is far to complicated and the examples on the site does not cover the restore attempt on the remote.

How can i restore a backup from the backup.example.com machine to Server1

i tryed like:

Code:
 rdiff-backup -r now home server1_backup::/home
And get something like :

Fatal Error: Restore target /home already exists, specify --force to overwrite.

--force makes things only worse, So where am i Wrong in my attempt to restore ???

gr ovis
Reply With Quote
Sponsored Links
  #2  
Old 6th March 2006, 20:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

I'd try to copy the files with scp.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 8th March 2006, 12:26
ovis ovis is offline
Junior Member
 
Join Date: Oct 2005
Posts: 28
Thanks: 0
Thanked 2 Times in 2 Posts
Default Rdiff-Backup Solved

Quote:
Originally Posted by falko
I'd try to copy the files with scp.
Oke i'vv done some studing and made the following conclusions.

* Debian has an old version in the package list 0.9.7-1 or so
* The new stable version 1.0.4 in my opinion works better

Code:
http://librsync.sourceforge.net
http://www.nongnu.org/rdiff-backup/

wget http://surfnet.dl.sourceforge.net/sourceforge/librsync/librsync-0.9.7.tar.gz
tar zxvpf librsync-0.9.7.tar.gz
cd librsync-0.9.7

./configure --prefix=/usr
make
make install

wget http://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.0.4.tar.gz
tar zxvpf rdiff-backup-1.0.4.tar.gz
cd rdiff-backup-1.0.4

python setup.py install --prefix=/usr
After some time i found out what restoring procedures are at my disposal, the manual page had so many opions that i lost it

I favor to make the backups on the backup machine (Duh) And do the restoring on the server1 site.

On the backup site:
==============

To see how many incrementals to choose to restore from:
rdiff-backup -l backup_server1

Found 1 increments:
increments.2006-03-07T16:12:27+01:00.dir Tue Mar 7 16:12:27 2006
Current mirror: Tue Mar 7 16:17:48 2006

- Restoring one file:
rdiff-backup -r 07-03-2006 backup_server1/home/FOO server1_backup::/home/FOO

- Restoring a directory:
rdiff-backup -r 07-03-2005 backup_server1/home server1_backup::/home-from-07-03-2006

Than:
mv /home-from-07-03-2006 /home

- Or more destructive:
rdiff-backup --force -r 07-03-2005 backup/server1/home server1_backup::/home


On the server1 side:
===============

- List the backup set:
rdiff-backup -l root@backup.example.com::/backup/backup/server1
Password:

Found 1 increments:
increments.2006-03-07T16:12:27+01:00.dir Tue Mar 7 16:12:27 2006
Current mirror: Tue Mar 7 16:17:48 2006

- Restoring one file:
rdiff-backup -r 07-03-2006 root@backup.example.com::/backup/backup/server1/home/FOO /home/FOO

- Restoring a directory:
rdiff-backup -r 07-03-2005 root@backup.example.com::/backup/backup/server1/home /home-from-07-03-2006

- Or more destructive:
rdiff-backup --force -r 07-03-2005 root@backup.example.com::/backup/backup/server1/home/ /home

Now you have some practical real life examples and i hope the big manual page makes more sense to you.
Reply With Quote
  #4  
Old 10th March 2006, 06:17
mgifford mgifford is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Backing up using a dynamic IP address

Ok, I followed your example and yeah! It's working.. I can automate off site backups which will really put my mind at ease. I had tried multiple times before and had given up hope. Very nicely written btw.

The main problem I ran into was that this process needs to have a static IP address in order to work. I'm just trying to set up an offsite backup for a number of servers and didn't want to have to upgrade my connection. Is there a way around that (other than entering the IP address and remembering to change it every once in a while).

Mike
Reply With Quote
  #5  
Old 10th March 2006, 06:41
mgifford mgifford is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default If you've just got sudo & not root, then what?

Is there a way to issue
ssh-copy-id -i ~/.ssh/id_rsa.pub root@server1.example.com

Without being root?

Suppose I'd just need to copy the public key of the user rdiff-backup to the file /root/.ssh/authorized_keys. That should work I assume.
Reply With Quote
  #6  
Old 10th March 2006, 08:00
mgifford mgifford is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 2 out of 4 is better, but still not good

Ok, following these instructions I've now got half my servers auto-backed up off site.

Now, I've gone over the steps outlined. Looked at a few other links. Checked everything that made sense to me.

Is there a debugging mode or setps for debugging rdiff-backup when it isn't working.

I keep gettting asked for a password on some of my servers.

Mike
Reply With Quote
  #7  
Old 10th March 2006, 10:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
Originally Posted by mgifford
The main problem I ran into was that this process needs to have a static IP address in order to work. I'm just trying to set up an offsite backup for a number of servers and didn't want to have to upgrade my connection. Is there a way around that (other than entering the IP address and remembering to change it every once in a while).

Mike
You can get yourself a domain at dyndns.org and use that.

Quote:
Is there a way to issue
ssh-copy-id -i ~/.ssh/id_rsa.pub root@server1.example.com

Without being root?
You can try with sudo:

Code:
sudo ssh-copy-id -i ~/.ssh/id_rsa.pub root@server1.example.com
But I didn't test this.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 10th March 2006, 15:02
ovis ovis is offline
Junior Member
 
Join Date: Oct 2005
Posts: 28
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

Quote:
Originally Posted by mgifford
Ok, following these instructions I've now got half my servers auto-backed up off site.

Now, I've gone over the steps outlined. Looked at a few other links. Checked everything that made sense to me.

Is there a debugging mode or setps for debugging rdiff-backup when it isn't working.

I keep gettting asked for a password on some of my servers.

Mike
Mike,

rdiff-backup -v 9 give you the debug info.

now the password.

you have to play around with the from="servername" field in the autorized_keys file that where i got wrong a lot too ..

gr ovis
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup script alex916 Installation/Configuration 5 6th June 2009 11:44
Backup routine for ISPConfig-equipped server IntnsRed General 4 5th May 2006 18:29
TPS Fedora Core 4 Managing e-mail adr + Backup Hagforce HOWTO-Related Questions 9 22nd February 2006 15:59
Backup files windows <-> linux namit Server Operation 3 5th January 2006 19:30
Command Line backup themachine Feature Requests 0 17th October 2005 01:40


All times are GMT +2. The time now is 05:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.