FOOD FOR THOUGHT Locally backing up VPS

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
Just created my first IncrediblePBX 13-13 on vultr. All is working well. I have never used a hosting service before, always local physical server. I have daily backups being made.
My question, how can you make a disk image of the VPS and download for disaster recovery or if I wanted to move to another VPS service?
Thanks,
Brian
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
Start your vm at vultr with archlinux iso from the library, you can then use clonezilla to do exactly what you want.
 

restamp

Member
Joined
Apr 24, 2016
Messages
97
Reaction score
53
I use rsync to perform my backups. Basically, I set up an rsync server on the backup device and created a shellscript to spool the content being backed up from the client to it. The backed-up content is stored in a directory hierarchy on the server which mimics the client and the permissions, ownership, etc., are stored in each file's extended attributes Restoral involves reloading the original OS template and then overlaying the backup-up content over it. I've only had to restore from a backup one time, but it was successful. If people would like a more detailed explanation and writeup, I'll try to provide it.
 

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
Thanks guys for taking the time to answer!!!
dicko, can you give more detailed instructions?

Brian
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
Rsync can't backup essential but mutable parts of the running system, you need the essential partion table and possibly efi/uefi stuff if appropriate, and the ability to appropriately rewrite such to your new milieu , so although you can likely restore to identical hardware (but seriously, you need to rsync several times to reduce the possibilyit of missed data, the first run will take quite a few minutes, things change in that time frame) , it won't satisfy the OP's request, clonezilla will but not while the system is running, if you want a realtime solution, look at mondoarchive, apart from some edge cases like zfs then it "just works" and you can schedule it to run every sunday morning :)
 
Last edited:

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
Thanks guys for taking the time to answer!!!
dicko, can you give more detailed instructions?

Brian


Not really, just mount the archlinux iso from the library, it will reboot into an archlinux gui, that's all clonezilla will available , you just need to RTFM for clonezilla
 

restamp

Member
Joined
Apr 24, 2016
Messages
97
Reaction score
53
Dicko is correct with respect to backing up mutable files on a running system using rsync, but realistically the only time this is a practical concern on a VPS running a typical mix of LAMP packages is with the database files (MySQL, Postgres). Thus it is wise to shut down the DB engines during a backup if you can.

The unfortunate truth is that most VPS providers do not give the user a decent mechanism for producing truly snapshotted backups. Fortunately, with the above exception, Linux is pretty forgiving about such inconsistencies, although I, too, tend to run backups twice -- back-to-back -- the first rsync typically taking a while and the second running quickly and only picking up changes to non-critical files.
 

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
thanks guys, i have a lot to learn!!!!!!!!!!!
newbie, brian
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Both Digital Ocean and Vultr now provide snapshot backups for 20% of the cost of the VPS. For a $2.50/mo. VPS, that works out to 50 cents a month. For a $5/month VPS, it's $1. That's about the cheapest insurance you can buy.
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
Both Digital Ocean and Vultr now provide snapshot backups for 20% of the cost of the VPS. For a $2.50/mo. VPS, that works out to 50 cents a month. For a $5/month VPS, it's $1. That's about the cheapest insurance you can buy.

True, and I love that aspect, but I think the question here was what if they wanted it independent of the hosting provider? If they have your backups and they have a problem ... you in deep doo-doo.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
We’re going to document our backup image technique in coming weeks. It’s the way all Incredible PBX servers are built with preconfigured data.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
I might be wrong , but vultr backups can not be used to restore to another instance, only to themselves, however snapshots can, you can have ten of them and thusly , repriduce, spawn,add a new flavor from that snapshot, within that ecisystem, to clone outside of vultr, then the archlinux/clonezilla concept works over most any available netwoirk filesytem transport, including lnfs or even cifs , clonezilla can also be installed iinto a small partition on your virtual disk ( think gparted ) if you want.

IMHO you absolutetly need to be able to export a clone of your working system outside of your current working environnent. Again, mondorescue is your savior, for ANY hosted solution , be that DO, Vultr,aws whatever, if you havn't tried it yet you really should , it just bloidy well works . . .
 

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
yes, need to protect myself incase vultr takes a dump. I have snapshots and backups with this VPS.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
yes, need to protect myself incase vultr takes a dump. I have snapshots and backups with this VPS.

But logically, if vultr takes a dump, as @krzykat says , you are in deep doo-doo.

Wise virgins ALWAYS have an "off-site" backup
 

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
yes, this is why i want to image the VPS and copy locally. I was just stating, i am using backup and snapshots as Ward mentioned.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
Perhaps I am missing something, but how are you exporting those from your hoster?

It is not easy with native Vultr. You have to do it live and preemptively within the running instance, that's exactly why I recommend Mondo, it works on any hosting service and with zero downtime.
 
Last edited:

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
I'm not, that's why i originally posted the question....i was just repling to Ward that i am using the backups and snapshots, but this does NOT protect me if Vutr goes "boom"...
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
And now you have a workable answer, use Mondoarchive :)
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I might be wrong , but vultr backups can not be used to restore to another instance, only to themselves

Just for reference, you can, and I have. A few months back, Vultr Miami got hit with DDOS, and they were fighting it hard, but it was still making voice conversations painful. I created new instances from those backups to new Atlanta instances and then made the necessary IP changes, FQDN entries, and was able to get a server moved and up in I'd say 10 minutes per box.
 

Brianmac

Active Member
Joined
Oct 7, 2014
Messages
594
Reaction score
177
krykat, i understand that and have another server on vultr and will be doing this. My issue is, what if something major happens to Vultr and my VPS goes down and i can't even login to my account.... this is not as impossible as it sounds(sunrocket, CloudAtCost), I always play worse side scenario, it helps me sleep at night(along with a little tequila)...

I would like you to meet my two brothers - "Murphy's Law" and "S.N.A.F.U" - they are always crashing my parties, unannounced !!!!!!

I played with the live linux and mondo rescue, this is perfect for what i am trying to accomplish!!!!

Thanks for ALL the help gang!!!
Brian
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top