How to do backup properly?

19 posts / 0 new
Last post
#1 Fri, 03/14/2008 - 16:15
rulez22

How to do backup properly?

Since got my server up and running I have a question to webmin/virtualmin guru - what is the best way to backup it all? And how often - once a day? As I understand options so far look like this: 1)backup entire filesystem with software like Acronis on to a second hdd (entire server has to be disconnected from internet for this procedure) 2)backup Webmin configuration on ftp server (like the one in your LAN) + Virtualmin backup of all users settings - websites files, settings, email accounts settings, their databases, etc.

Any recommendations? I will really appreciate it.

Fri, 03/14/2008 - 16:41
Joe
Joe's picture

Webmin can handle all of your backup needs--you don't need anything else, though some folks like to use Bacula (which Webmin also has a nice module for). If the box has to be offline for Acronis, I'd say it isn't at all suitable for the job--servers are always on. There are many tools that work fine on a live system...use them instead.

Here's what I do on Virtualmin.com and our other two servers:

Use the Filesystem Backup module to make a weekly full backup and daily incremental backup. I have a remote backup account at our hosting provider so this backup can be stored on another system and disk. This makes use of dump or tar to backup all or some of the system. I use dump and I backup everything except for /proc, /dev, /lost+found, and /tmp. With compression a full backup shrinks to about 50% the size of the actual data...so I can have a full backup, plus a weeks worth of increments on a disk or shared FS of the same size as the primary system disk. This is pretty cost effective.

Use the Virtualmin backup feature to backup all of our virtual servers daily. I send this to a second disk within our server, so it's easily accessible and very fast to backup and restore from. These can be backed up locally, to FTP, to SSH, to a shared file system, or to S3 (in Virtualmin Professional only, and only if it compresses to less than the bucket size at S3).

I also use the Backup Configuration Files module just so I have a backup of the important configuration files on the system--if I do something stupid and break the system in a way that I don't understand, I can easily pull out an old copy of the file and compare. Since these files are tiny, backing them up is cheap, so I do it daily.

I've never had a problem that those backups wouldn't allow me to recover from quickly and without much pain.

--

Check out the forum guidelines!

Fri, 05/02/2008 - 14:39 (Reply to #2)
JohnPenrod

Joe,

It would be great if you incorporated some sort of incremental backup into the domain bakups.

I'm backing up about 12 gig a night as it stands now. And most of the 12 gig is data that is static and does not change. Takes about 9 hours to back up all of my domains.

An incremental would be around 200 meg or so.

Thoughts?

John P.

Fri, 05/02/2008 - 14:49 (Reply to #3)
Joe
Joe's picture

Hey John,

I agree. Incremental is the next frontier. Obviously, dump supports incrementals, and I use them on all of our servers. But for Virtualmin virtual server backups, it's not provided. But, it would be relatively easy to add, I think. We just need a "last full backup" entry somewhere in /etc/webmin/virtual-server to keep up with when we last did a big backup, and then use find to tar up just the changed files. Putting them all back together would still require quite a bit of code, but as folks are using Virtualmin for larger and larger systems, it's becoming more important.

I'll file a wish in the ticket tracker. It'll probably take a couple more revisions to get it built and tested, but as you may have noted we roll out revisions every two weeks or so, so it shouldn't be more than a month away.

--

Check out the forum guidelines!

Wed, 05/21/2008 - 23:39 (Reply to #4)
southerns

<b>Joe wrote:</b>
<div class='quote'>Hey John,

I agree. Incremental is the next frontier. Obviously, dump supports incrementals, and I use them on all of our servers. But for Virtualmin virtual server backups, it's not provided. But, it would be relatively easy to add, I think. We just need a &quot;last full backup&quot; entry somewhere in /etc/webmin/virtual-server to keep up with when we last did a big backup, and then use find to tar up just the changed files. Putting them all back together would still require quite a bit of code, but as folks are using Virtualmin for larger and larger systems, it's becoming more important.

I'll file a wish in the ticket tracker. It'll probably take a couple more revisions to get it built and tested, but as you may have noted we roll out revisions every two weeks or so, so it shouldn't be more than a month away.</div>

Hi Joe

any news on the Incremental Virtualmin virtual server backups yet

Thanx

Shane

Thu, 05/22/2008 - 14:47 (Reply to #5)
Joe
Joe's picture

I believe it's coming in 3.58.

--

Check out the forum guidelines!

Sat, 06/28/2008 - 08:22 (Reply to #6)
JohnPenrod

Hey Joe.

Hmmm.... Let's see, what can I say? How about thank you!

Just moved to 3.58 and saw the incremental backup feature. I'll start testing it this week.

Thanks!

John P.

Sun, 02/22/2009 - 06:43 (Reply to #7)
PaulChurchley

Any solution to this as Iam getting the same problem?

Sun, 02/22/2009 - 08:53 (Reply to #8)
ronald
ronald's picture

in the module for scheduled backups, is the Create destination directory? box ticked?
else it won't create the folder on the destination

Sat, 03/22/2008 - 12:09
rulez22

Thanks for the answer! One question I've got - how do you exclude some catalogs from a backup?

Sun, 06/07/2009 - 07:32
roro

Someone can help me configuring the incremental backup?

Im using as backup destination:

backups/%d-%M-%Y

But I get the following message:

Cannot backup multiple domains to /home/backup/20-00-2008, as it is not a directory
Backup failed!

----
First I don't know why the month is wrong, and then well, obviously that directory does not exist.

Sun, 06/07/2009 - 07:32
roro

Someone can help me configuring the incremental backup?

Im using as backup destination:

backups/%d-%M-%Y

But I get the following message:

Cannot backup multiple domains to /home/backup/20-00-2008, as it is not a directory
Backup failed!

----
First I don't know why the month is wrong, and then well, obviously that directory does not exist.

Sun, 06/07/2009 - 07:32
andreychek

I think I see what the problem is -- you're using this backup directory:

backups/%d-%M-%Y

Except, %M is &quot;minute&quot;, where I think you meant to use lower-case &quot;m&quot; for month.

So, by the time Virtualmin begins copying the file, the minute has changed, thus making the backup directory invalid :-)

Try using this:

backups/%d-%m-%Y

And I think you'll be good to go!
-Eric
-Eric

Sat, 11/22/2008 - 06:11
roro

Theanks for the help but still getting the same error:

Cannot backup multiple domains to /home/backup/22-11-2008, as it is not a directory
Backup failed! See the progress output above for the reason why. Total backup time was 00 minutes, 00 seconds.

Thu, 09/10/2009 - 11:44
bbuhlman

Hi, Trying to follow advice from above (Joe not God) and wondering how to exclude /proc and /dev from dump using webmin file system backup. I've tried to use chattr +d on these and I get these errors: Inappropriate ioctl for device while reading flags on /dev

Is there a way to specify this on the "Extra command-line parameters" in the backup module?

Thanks, Bill

Thu, 09/10/2009 - 17:43 (Reply to #15)
andreychek

Hmm, are you using the Filesystem Backup that's located in Webmin -> System -> Filesystem Backup?

If so, what you could do is go into "Backup options", and offer a space separated list of directories to skip.

-Eric

Wed, 09/16/2009 - 16:56 (Reply to #16)
bbuhlman

I am using the webmin system files backup. Is the line you are talking about called Ëxtra Command-Line Parameters"? Would I add paths like /proc /dev /lost+found /tmp

like this?

Thanks

Wed, 09/16/2009 - 17:34 (Reply to #17)
andreychek

No, not in "Extra command-line parameters" -- you'd use the field "Files and directories to skip".

But yes, you'd enter them just like you showed, with space separated directory names.

-Eric

Sat, 06/16/2018 - 05:58
pragma

I tried different methods and this worked perfectly. Please hit "Like" if it works for you as well.

Here is a solution:

Case I: Single Directory Exclude a directory from backups:

/home/example/public_html/docs/


Then syntax in "Files to exclude from each domain" should be:

public_html/docs


Case II: Multiple Directories Exclude multiple directories from backups:

/home/example/public_html/docs/
/home/example/public_html/var/
/home/example/domains/testbackups.example.com/public_html/media/cache/


Then syntax in "Files to exclude from each domain" should be:

public_html/docs
public_html/var
public_html/media/cache


Case III: Exclude file extensions

Exclude .exe .tar .tar.gz :


Then syntax in "Files to exclude from each domain" should be:

*.exe
*.tar
*.tar.gz


Case IV: All above cases at once

public_html/docs
public_html/var
public_html/media/cache
*.exe
*.tar
*.tar.gz


Note: These exclude files/directories are applicable globally for all websites/subdomains included in the backups. If you want to exclude the files/directories for website specific then you need to create schedule different backups for each domain.

Topic locked