Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-28-2011, 11:57 AM
|
#1
|
LQ Newbie
Registered: Jan 2011
Posts: 3
Rep:
|
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!
|
|
|
01-31-2011, 12:51 AM
|
#2
|
Member
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Manjaro, Debian64 stable
Posts: 528
Rep:
|
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.
|
|
|
01-31-2011, 08:08 AM
|
#3
|
LQ Newbie
Registered: Jan 2011
Posts: 3
Original Poster
Rep:
|
Thanks Andy for your answer!
Quote:
Originally Posted by Andy Alkaline
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!
|
|
|
All times are GMT -5. The time now is 11:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|