Backup/restore to connected machine...

11 posts / 0 new
Last post
#1 Mon, 08/20/2007 - 22:56
ConRadical

Backup/restore to connected machine...

It would be nice to be able to backup and restore to a local machine, like your laptop... This would be a nice feature, I find myself saving the file locally on the server then using FTP to download.

Thu, 08/23/2007 - 02:21
Joe
Joe's picture

This, of course, assumes a quite small backup size. 2GB is the limit of many web clients (and even of Webmin's web server, possibly--Apache had a 2GB limit unless patched until version 2.2, so Webmin might also have such a limit), and timeouts will be a problem regardless of the client/server file size limits. But, still, I reckon 2GB is reasonable for many many account backups, and modern broadband makes timeouts less of an issue.

I'll ask Jamie to chime in. I suspect it's relatively trivial to add such an option.

--

Check out the forum guidelines!

Thu, 08/23/2007 - 07:31 (Reply to #2)
Joe
Joe's picture

That's not a bad idea for a feature - I have just implemented it for inclusion in the Virtualmin 3.45 release. It will only be available when backing up a single domain though, as there's no way to download multiple domains' files in the browser.

--

Check out the forum guidelines!

Tue, 08/28/2007 - 15:31 (Reply to #3)
ConRadical

That's exactly what I've been looking for... thanks guys!

Mon, 09/03/2007 - 13:07 (Reply to #4)
ConRadical

Jamie...

I just used the backup to browser, and it works.

Now --What about adding a restore from browser?

Mon, 09/03/2007 - 13:16 (Reply to #5)
Joe
Joe's picture

Yes, I had the same thought .. it is on my TODO list.

--

Check out the forum guidelines!

Mon, 09/03/2007 - 18:15 (Reply to #6)
ConRadical

great... thanks Jamie!

Fri, 08/31/2007 - 00:21
gbjbaanb

come to think of it, I have a suggestion to improve this a little.

All CPs have a 'download a tarball' option, but none set up a rsync module for it. This is probably because the tarball option is easiest.

I think it would be a nice idea to create a new module in rsyncd.conf for each domain, secure access pre-set for an admin's backup server IP and specified usernames. Then, users (and the admin) could download all domain files regularly without using up all the hosts' bandwidth.

A problem is that you cannot put multiple paths in the module declaration, so VirtualMin would have to either create a new directory somewhere with hardlinks to all the directories used by each domain, or a subdir in the domain's main directory to include directories elsewhere on the filesystem (eg maildir, mysql files, etc).

Or an alternative is to automatically backup these files to a 'backup' dir inside the rsync path.

So: once you've decided which method to use to include all required files, simply append a appropriate rsync module to rsyncd.conf, I don't think it'd be too difficult to implement, but would be quite a unique feature.

Fri, 08/31/2007 - 01:33 (Reply to #8)
Joe
Joe's picture

<div class='quote'>All CPs have a 'download a tarball' option, but none set up a rsync module for it. This is probably because the tarball option is easiest.</div>

Because people are afraid of rsync! ;-)

Seriously, I think there will be an rsync or rdiff-backup option in the future, but tar is just so much better understood, and so much more portable--you can take a tarball to another machine and restore it. You can't do that with an rsync (unless you're rsyncing the tarball, which is likely to still use a lot of bandwidth because a compressed file is effectively randomized, rather than looking roughly the same between two revisions). It's also a problem that rsync and rdiff-backup require the same space on the destination as on the source...It's just not ideal.

In short, the problems aren't really with setting it up--I think we can manage a few configuration files (how's that for an understatement?), but the resulting data isn't very friendly to move around and deal with.

--

Check out the forum guidelines!

Fri, 08/31/2007 - 00:20
gbjbaanb

Well, those people don't have to even know the option to use rsync backups is there!

I think the difference between rsync and tarball downloads is very minor - both require x amounts of bandwidth and disc space to download, and both require an upload to restore. I'd say disc space is plentiful, and bandwidth is capped.

Think what is involved: with a tarball you download a file to bakcup, and upload it to restore. Pretty easy, simple to conceptualise.

With a rsync backup: you download a directory, and upload that directory to restore! Somewhat more difficult (though my suggestion was geared to making this much easier), possibly easier to conceptualise (especially for a 'normal' user who 'copies the files to his computer' instead of downloading the 'backups').

The huge advantage is that more regular backups can be performed compared to the tarball way, and for an admin, I'd want to download a full backup every day at least (possibly more!). Now, I can set up a rsync backup for my server, but then it requires me to set up the restore process too - which I'd prefer VirtualMin to do a lot of work there for me. I'd also like to give this opton to users so they can have the warm, fuzzy feeling of having regular automatic off-site backups too.

If you consider what happens when you upload the tarball you'll see there's not much in it - you unzip the tarball somewhere anyway so uploading a directory is just a little less efficient, but then you'd hope not to ever do it.

(BTW, I download tarballs at the moment, and rsync does handle it, I get about 6x speedup. I'm quite impressed by that!). I think this blue-sky suggestion is something that would add quite a bit of value to VM without any major disadvantages. cheers.

Fri, 08/31/2007 - 07:45
Joe
Joe's picture

What I know some people do is use Virtualmin's backup feature to create tarballs of everything *except* the home directories, and then use a separate rsync cron job to backup /home . This way you get the speed benefit of incremental backups from rsync, while still capturing the Apache config, MySQL DB contents, mail aliases and DNS records in the Virtualmin tar.gz backup files.

--

Check out the forum guidelines!

Topic locked