Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Free backup solution for cheap VPS's
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Free backup solution for cheap VPS's

I have half a dozen cheap (KVM) Linux VPS's (AlmaLinux 8, 9 and Ubuntu) which do not include backup/restore features from the provider. I'm trying to find a simple, free way to create/restore images of the VPS's but I've come across only one detailed tutorial. The problem with the tutorial is that it uses dd to create a raw disc image which is not very efficient when moving an image, over the Internet, of a 60GB HDD with 80% free space.

Does anyone know of a tutorial, for noobs, that shows how to initiate a backup/restore from a remote computer, at home, using SSH? I guess I'm looking to pull images, as opposed to pushing them. Having everything automated with daily backups would be great but my main goal is finding a way to create a full backup image (online or offline) and save it on a home computer without having to open additional ports on my home network.

I have Veeam installed at home but the only way that I see it working over the Internet is by installing a VPN client on the VPS which I'd rather not do. Also, I'd have to open a ticket, with the VPS provider, each time I want to mount a custom ISO (boot disc) so I'm guessing the only alternative would be to create a partition and edit grub so that I can boot from a partition that contains the files from a live CD.

Any advice will be appreciated.

Comments

  • @jeffshead said: Any advice will be appreciated.

    I tried to do the same. Not a long time ago.
    I give up. I tried a lot of solutions, containers, images, skipping free space, etc.
    Yes, it was working, but not as good as it I imagine to myself.

    Depends on the provider where I roll-out my image there were tons of problems.

    • Disk size, partition issues, network interface settings & issues related to network.
    • Memory related stuff
    • random issues here and there (many of them)

    In other words you can create snapshot (image) on one VPS provider and use the snapshot only on this VPS.

    But my idea was about switching between VPS as fast as I can.
    I even tried to use netsted virtualization & vagrant-like tools, etc.

    I tried all of that. I've spent maybe a month for sure for trying different solutions.
    And as I said earlier - i gave up. Also i tried ansible, but did not liked it (because a lot required to write for my simple needs)

    I decided to learn bash, and properly write my own installation script.
    And I did that. I've spent maybe a day for finishing complete script, and maybe extra 1-2 weeks to polish script for doing all required for me stuff on any provider VPS.

    And it was working great. Really great. And still working now.


    Another part of your question: "cheap or free solution for backup".
    For incremental backups - probably yes, some providers from rclone list.
    For full backups - nope. I dunno what is cheaper, hetzner storage box, or cheap VPS with a lot of GB space & access via scp...

  • JabJabJabJab Member
    edited March 2023

    I don't think images will work with different providers - they have different systems, specs, settings etc. Images will work inside one provider ecosystem, but going this for restore gonna be PITA on different provider.

    For actual backup without transfering whole disk there was a lot of topics like that here already - keywords for search to find those topics: rdiff-backup, duplicity or rsnapshot. There is also BorgBackup, but mentioned less times I think.

  • jeffsheadjeffshead Member
    edited March 2023

    Thanks for the replies!

    Having an image that can be used on other providers would be nice but that's not what I'm after. I'm looking for the simplest, quickest way to pull a full backup to my home network that can be easily restored back to the same VPS server if I screw something up while making major changes to that VPS.

    Just trying to avoid wasting time on solution after solution only to find that they won't do what I want or that there's a better approach.

    I'm currently playing around with Clonezilla on a couple of local VM's to see if it will do what I want but so far I don't see a way to pull an image, only push.

  • On KVM (even 0.5GB RAM/5GB disk) I install alpine as a thin "hypervisor" and then the real stuff in LXC on a btrfs partition. Then run a cron job to take either a full/incremental btrfs snapshot and copy it offsite.

  • This solution is terrible. The main reason to backup whole images is to save hours and hours of OS and application service packs and patches and shit. That's usually the best solution for Windows, but not for Linux VM's from different providers.

    You should just be backing up and restoring the data. Depending on the application, it could be 5 minute recover instead.

    Also, if you can get free Oracle VM's, you can automate disk image backups that restore easily.

  • alt_alt_ Member

    If you're looking for a cost-effective backup solution for your inexpensive VPS, using rsync to backup to a free S3 storage may be a viable option.

  • You really should think about if image backup is what you want.

    You want to be able to restore quickly in case you mess up something in the vps. That's a very common reason to do backups, so nothing strange there.
    But think about it this way: how much data could you possibly destroy by accident? We are probably talking about a single line in a configuration file or possibly a corrupt database or something similar. Restoring an entire system from scratch to correct a single line or maybe a few megabytes of data is insane, that is not the way to do it.

    Use restic, borg, rsync or similar and backup your changes.
    I use restic and it runs once every hour and backups everything that's changed. It takes me mere seconds to revert any part of my system back to how it looked 1, 2, 5 or 48 hours ago, whatever interval I chose. After 7 days I only have one backup per day, and after 30 days, I have one backup per month up to a year.
    You simply could not achieve this kind of coverage the way you try to do it, but with a decent backup solution like the ones mentioned it's not even difficult.

  • @TimboJones said:

    You should just be backing up and restoring the data. Depending on the application, it could be 5 minute recover instead.

    Don't know many Linux servers that can be up and running again in 5 min, just by recovering/restoring some data only.

    If my Nextcloud server goes down, it won't take 5 min to have it up and running again if everything has to be reinstalled.

  • m4num4nu Member, Patron Provider

    At BorgBase we give you the first 10 GB for free. That's after compression and deduplication, so should be enough for a 30-50 GB VPS. 🙌

    Thanked by 2tedtomato Bochi
  • @tedtomato said:

    @TimboJones said:

    You should just be backing up and restoring the data. Depending on the application, it could be 5 minute recover instead.

    Don't know many Linux servers that can be up and running again in 5 min, just by recovering/restoring some data only.

    Wut? That'll be the most common case. Reinstall OS from panel using the provider's template, then run your reinstall script, ansible, github repo or whatever. If this was business or production setup, this is the solution.

    If my Nextcloud server goes down, it won't take 5 min to have it up and running again if everything has to be reinstalled.

    That really depends on how much data is used. It'll definitely be less time than transferring the whole image.

  • vsys_hostvsys_host Member, Patron Provider

    The best way to automate software configuration is through Chef or Ansible and copy variable data using rsync. If you copy the entire VPS, it will be difficult to recover. However, this approach allows for quick setup, and all that remains is to copy the data.

  • tjntjn Member
    edited March 2023

    I would echo what @TimboJones and @vsys_host are saying - make your infra/setup as portable and as agnostic as possible. Ansible (or great bash scripts) will go a long way to help you do so.

    I've reached a stage where my ansible playbooks configure a system and then I just point it to my data (wether it's a database, object storage, etc...) and I'm up and running in less than 10 mins.

    If something breaks, trash the instance, run the playbooks, restore the data and I'm also back up and running in minutes.

    I put together a few Ansible resources a while ago here.

Sign In or Register to comment.