Use a Virtualmin Virtual Server as an Rsync destination

Hi Guys,

We have a customer that would like to use his Virtual server to backup data from his windows server. the Idea would be to use say Delta copy on the Windows server to connect to his Virtual server to perform a backup. could you please point me in the right direction to get this done.

Would it just be a case of enabling SSH on his Virtual server and using Rsync to connect?

Or would there be another trick to it?

Regards

Peter

Status: 
Active

Comments

Howdy -- yeah, enabling SSH on an account and then using rsync over SSH would be a good way of handling that.

Hi Guys,

Ok so I have installed Rsync on our Virtualmin server, however when configuring it it needs me to specify a backup directory.

Which is fine but it means that only one user can use it. is there any way to configure it so that each Virtual machine has its own rsync backup destination directory?

Cheers

Peter

Yeah, rsync does need to have a destination directory specified.

It doesn't have knowledge of Virtualmin, or of your multi-user setup -- rsync simply copies files from one location to another.

You're saying you have multiple Virtual Machines there -- meaning that you have multiple Linux servers you're trying to backup with rsync? If that's the case, that sounds like you have multiple rsync commands you'd need to be using, meaning you could change the backup destination within each script.

So just to give you a better idea of our issue.

We would like to be able to allow each of our customers to be able to use their excess storage space to backup some of their data.

the issue I have currently encountered is that I can only set the Rsync server one backup location.

so what you are saying is that I can run a script to change the location on the fly?

so does this mean that it needs to be run from the client side?

Regards

Peter

Well, there isn't a way to do what you're describing in Virtualmin.

Whatever it is you're looking to do there with rsync, it would need to be setup manually, outside of Virtualmin.

If you're looking to allow Virtual Server owners to use additional space for backups -- there is a built-in backup feature that would allow them to generate backups, and even send them to remote locations.

However, that feature wouldn't use rsync, it would use the standard Virtualmin backup procedure. The benefit to that though is that users would have an easy time restoring their backups if they ever need to.

No No, you misunderstand

we would like our users to be able to use excess space on their virtual servers to backup there own data from their desktop/server in their office.

you with me now?

I re-read some of your previous comments, and I just realized this here is the issue:

Ok so I have installed Rsync on our Virtualmin server, however when configuring it it needs me to specify a backup directory.

You shouldn't have to specify any backup directory when installing rsync on the server.

Rsync is just a command line tool.

You just need to ensure that the command "/usr/bin/rsync" exists.

If so, any user with rsync installed remotely, such as those PC's in your office, can specify any backup directory they want when using rsync.

Each desktop can have a different backup directory, or could even have multiple backup directories if they want.

I'm not sure which rsync package is causing the confusion, but I'm wondering if maybe the rsync daemon was installed?

You don't need an rsync daemon (and I would recommend against it's use) -- you can use rsync over SSH, which would be secure, and allows you to access the SSH accounts on your server.

Ok so what your saying is that I need to remove Rsync Server that I installed and just use the rsync client?

Joe's picture
Submitted by Joe on Mon, 03/23/2015 - 02:32 Pro Licensee

You don't have to remove the rsync server, but you don't need to use it for this purpose, either.

On the client system, do the following:

$ rsync -avz -e ssh /path/to/backup user@servername:/home/user/backup-dir/

If you setup an authorized_keys file on the server with a public key generated for this purpose (a regular ol' ssh key pair), you won't even need to use passwords, and it can run fully unattended.

Joe's picture
Submitted by Joe on Mon, 03/23/2015 - 02:34 Pro Licensee

Another option (of many): Pydio (one of the script installers) has a sync daemon for Windows and Mac OS X that'll handle this kind of task and provides a web interface on the server for browsing files. It's kinda like Dropbox. I'm pretty sure it uses an rsync style algorithm (maybe even librsync itself) to do the syncing of files.

Hi Joe,

I'll look into the Pydio solution you just suggested, however the solution I was looking at involved "Deltacopy" running on a Windows server 2008 r2 platform, backing up to the clients VM.

Wonder if that will work...

Hi!

I am using a tool to backup the data on my computer - BackInTime (in Ubuntu). It is based on rsync and it allows me to send my backups to a remote destination via SSH.

I have a VPS with Virtualmin, but I am a newbie in using it.

Would it be possible to teach me how to set up the SSH destination on my VPS? What will be the host, the username, how can I setup the SSH key? Where will the destination directory be on the Virtualmin server?

Please forgive me if these questions are too basic... But I wasn't able to find what I need anywhere on the web.

Thank you!

Howdy alien -- we can certainly lend a hand, though as it appears you're using Virtualmin GPL there, could you start a new thread about that in the Forums? We'd be happy to follow up with you over there to help get that all setup.