this post was submitted on 29 Jul 2023
16 points (86.4% liked)

Linux

48655 readers
403 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Yeah another post about backups, but hear me out.

I read most of the other post here on lemmy, read through the documentation from different backup tools (rsync, Borg, timeshift) but all those backup tools are for "static" files.

I mean I have a few docker container with databases, syncthing to sync files between server, Android, Desktop and Mac, a few samba shares between Server, Mac and Desktop.

Per say on Borg's documentation:

  • Avoid running any programs that might change the files.
  • Snapshot files, filesystems, container storage volumes, or logical volumes. LVM or ZFS might be useful here.
  • Dump databases or stop the database servers.
  • Shut down virtual machines before backing up their images.
  • Shut down containers before backing up their storage volumes.

How I'm supposed to make a complete automated backup of my system if my files are constantly changing ? If I have to stop my containers, shutdown syncthing and my samba shares to make a full backup, that seams a bit to much of friction and prone to errors...

Also, nowhere I could find any mention on how to restore a full backup with a LVM partition system on a new installed system. (User creation, filesystem partition...)

Maybe, I have a bad understanding on how It works with linux files but doing a full backup this way feels unreliable and prone to corrupted files and backup on a server.

VMs are easier to rollback with snapshots and could't find a similar way on a bare metal server...

I hope anyone could point me to the right direction, because right now I have the feeling I can only backup my compose-files and do a full installation and reconfiguration, which is supposed to be the work of a backup... Not having to reconfigure everything !

Thanks

you are viewing a single comment's thread
view the rest of the comments
[–] UnfortunateShort 2 points 1 year ago

All you need is restic, rclone, snapper and btrfs. Snapper and btrfs work almost on their own, rclone helps you connect to remote/cloud storage and restic enables very straightforward backups.

As for restic, you just need to mind that it creates lock-files, so if there's an unexpected shutdown, you might need to delete them manually. The advantage is that you can access one repo from multiple machines. And don't forget to run a cleanup command in your script (in case you automate it), because there are no automatic ones.

rclone is usually rather easy to use, but your mileage may vary depending on the type of storage you want to use. Especially if you want to tune for maximum performance.