Howdy, Stranger!

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


full server backup and restore - easy way
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.

full server backup and restore - easy way

Hi,
i have some vps where the provider dont support backups/snapshots.
Whats the easiest way to do a full backup of a running server? I have plenty of storage left for example at gdrive.
Servers are all running ubuntu, some running debian.

Comments

  • lukast__lukast__ Member
    edited September 9

    fstrim + fsfreeze + backup raw disk either via ssh or to mounted storage with dd.
    Edit: optimally compress it with gzip/pigz/algo of your choice.

    Thanked by 1gbzret4d
  • Also looking for the same. It would be nice to have a GUI.

    Thanked by 1gbzret4d
  • CharityHost_orgCharityHost_org Member, Patron Provider

    @gbzret4d said:
    Hi,
    i have some vps where the provider dont support backups/snapshots.
    Whats the easiest way to do a full backup of a running server? I have plenty of storage left for example at gdrive.
    Servers are all running ubuntu, some running debian.

    For gdrive you might be able to use something like this:

    https://ruan.dev/blog/2020/05/08/server-backups-to-google-drive-using-the-drive-cli-tool

    Otherwise to a linux backup remote destination, do a search for "rsync full linux server backup with scheduled cron."

    examples:
    https://averagelinuxuser.com/automatically-backup-linux/

    https://unix.stackexchange.com/questions/158493/what-should-i-include-and-exclude-with-rsync-to-back-up-my-system

    If you want a VDS with free monthly snapshot backups, and addon 1 to 7 daily snapshots, we would migrate your VPS for free as well considering you have root access. https://charityhost.org/virtual-dedicated-servers

    CharityHost.org will support and make sure your backups include you db backups as dumps post migration.

  • WebProjectWebProject Host Rep, Veteran

    @gbzret4d said:

    provider dont support backups/snapshots

    Just imagine if the snapshot system fails, example OVH VPS backups as they did stored backup data in the same DC as VPS nodes and whole DC burned.

    Personally like to do backups using bash script so all the settings are backup and can be easily restored.

    Thanked by 2sasslik tentor
  • emghemgh Member

    If provider dosen’t do snapshots

    App specific backups are way superior to replicating snapshots manually with dd or something

    As in, think about what’s important, and schedule backing up of that

    Thanked by 2gbzret4d tentor
  • @emgh said:
    If provider dosen’t do snapshots

    App specific backups are way superior to replicating snapshots manually with dd or something

    As in, think about what’s important, and schedule backing up of that

    For example greencloud don't support snapshots but I have something more important running on the VPS I have there, atleast it would take some time to reconfigure the VPS and the tool running on it. IMO a full server backup is the way to go for me.

    Thanked by 1emgh
  • emghemgh Member
    edited September 10

    @gbzret4d said:

    @emgh said:
    If provider dosen’t do snapshots

    App specific backups are way superior to replicating snapshots manually with dd or something

    As in, think about what’s important, and schedule backing up of that

    For example greencloud don't support snapshots but I have something more important running on the VPS I have there, atleast it would take some time to reconfigure the VPS and the tool running on it. IMO a full server backup is the way to go for me.

    No

    App backups & automating restoration is the way to go

    Use bash scripts

    One for backup, one for restore

    Much much smaller backups. Meaning they can run more regularely and use less bandwidth, and are faster to restore

    Then create a bash script to restore the server from said backups

    It’ll be fun

    Then try running the restore bash on a different VPS until it works as you intended

    Thanked by 1gbzret4d
  • For file level backups I did not find anything better/faster than restic. For complete FS snapshot based backups I strongly recommend ZFS and it's snapshotting. You will not be able to send this to Gdrive and similar but yes on some storage VPS with ZFS on it.

  • CharityHost_orgCharityHost_org Member, Patron Provider

    There are so many ways to backup, it really varies on your abilities and available resources. If you want a devops approach, use ansible or another configuration management tool along with shell scripts.

    Ansible with a custom playbook will allow you to configure onto a fresh new OS all the packages and configurations you will need in one run. Then it's just like @emgh mentioned, you restore the application files and database with shell script, which you have backed up.

    That will be the fastest way to backup and restore semi automated.

    You can get another VPS (in another location best practice) and use that as your remote backup server or setup a backup host at your office/home to connect to your vps to rsync copy the files and database dump in a shell script on scheduled cron.

    You can also use backup software like backuppc or bacula which are open source free, or other paid backup software which is paid and often expensive like r1soft. These systems use rsync to connect via ssh to backup and restore full and incremental backups. r1soft uses an agent, not rsync.

    Thanked by 2emgh gbzret4d
  • rlcone may be easiest way of all.

  • CharityHost_orgCharityHost_org Member, Patron Provider

    @seenu said:
    rlcone may be easiest way of all.

    Ah yes! rclone is great! Add that to the rsync type copy app.

    Thanked by 1gbzret4d
  • For no reason here is the hardest way to back up your files:
    Manually copy every single file and folder individually to your backup location with the cp command :D

    Thanked by 1gbzret4d
Sign In or Register to comment.