LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-28-2011, 11:57 AM   #1
luchonat
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Automating a restore with backuppc


People! First of all, excuse my english, I'm from Argentina.

Well, here is the thing. I've deployed BackupPC in a server at work, and everything is working fine.

Now, what I need to do this thing.

I have a remote server with a website and a postgres db running. I've been able to set up everything to be backed up using rsync. But I would like to make the same process to restore the backup immediately in a local server trough rsync, that has to be ready just in case of failure of the remote server. What I've tried to do is to run the DumpPostUserCmd, so whenever a dump is performed in the remote server, I can have my local server updated. What I've find out is that when you perform a restore through the web interface, the command that performs it is (using ps ax in the backuppc server):

/usr/bin/ssh -q -x -l root myserver.wheretodotherestore.mydomain /usr/bin/rsync --server --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --relative --ignore-times --recursive . /path/to/restore

So, what I could find out is:

/usr/bin/rsync is the command that the process runs in the server where I want to put the restore. Then the options, and finally, source and destination of the restoration. But, as you can see, the source is '.' but I cannot guess where to point that!!! So, any suggestions? Thanks a lot people!
 
Old 01-31-2011, 12:51 AM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528

Rep: Reputation: 167Reputation: 167
Well, a dot often represents your present working directory, or the working directory a program was executed from.

But it seems like if you are the one who scheduled the backups, you would know the source of your backup, if you're going to restore them to target.

Whatever the target directory you back them up to, that would be the source for restore.

Maybe some more details would help; perhaps something got lost in translation.
 
Old 01-31-2011, 08:08 AM   #3
luchonat
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks Andy for your answer!

Quote:
Originally Posted by Andy Alkaline View Post
Well, a dot often represents your present working directory, or the working directory a program was executed from.

But it seems like if you are the one who scheduled the backups, you would know the source of your backup, if you're going to restore them to target.

Whatever the target directory you back them up to, that would be the source for restore.

Maybe some more details would help; perhaps something got lost in translation.
Let's see the command again (this command is executed from the backuppc server):

/usr/bin/ssh -q -x -l root myserver.wheretodotherestore.mydomain /usr/bin/rsync --server --numeric-ids --perms --owner --group -D --links --hard-links --times --block-size=2048 --relative --ignore-times --recursive . /path/to/restore

So the red part, is used to log in into the remote server, where I want the folders to be restored. Then, the blue part shows what is executed in the remote server, the command rsync with the options, the source and the destination, with the source being '.' and the destination, '/path/to/restore'. This command is the one that is executed when you make a restore from the web(cgi) interface.

I know that '.' means current path. But in this case, does it refer to the current path of the local or the remote server? I've been digging into the backuppc code, but coud not find anything usefull.

Well, thanks again Andy!
 
  


Reply

Tags
automated, backuppc, replication, rsync


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing BackupPC : The requested URL /backuppc was not found on this server jonaskellens Linux - Newbie 7 12-17-2009 02:24 AM
BackupPC-3.1.0 Error kantijena Linux - Server 1 03-04-2008 05:00 AM
BackupPC help tsaravan Linux - Networking 1 12-20-2007 05:46 PM
backuppc tkt Linux - Newbie 0 06-10-2005 12:44 AM
BackupPC uselpa Slackware 1 01-24-2005 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration