this post was submitted on 02 Nov 2024
35 points (97.3% liked)

Selfhosted

40296 readers
344 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Last night I was writing a script and it made a directory literally named "~" on accident. It being 3am I did an rm -rf ~ without thinking and destroyed my home dir. Luckily some of the files were mounted in docker containers which my user didn't have permission to delete. I was able to get back to an ok state but lost a bit of data.

I now realize I really should be making backups because shit happens. I self host a pypi repository, a docker registry both with containers and some game servers in and out of containers. What would be the simplest tool to backup to Google drive and easily restore?

top 14 comments
sorted by: hot top controversial new old
[–] april@lemmy.world 11 points 2 weeks ago* (last edited 2 weeks ago)

There's different kinds of backups. For this you don't need off-site storage.

For this I set up zfs auto snapshotting which means when I delete stuff it isn't really deleted because a snapshot is still pointing at it until it rolls off the time window.

Both zfs and btrfs can do this but you do need to change the filesystem to use these which can be a lot of work.

[–] Shimitar@feddit.it 11 points 2 weeks ago (3 children)

Restic or Borg. For restic I use the great Backrest web GUI.

I mounted an USB drive to one of my OpenWRT access points and backup on that one.

Rclone or fuse can mount/access Google Drive and can be used as back end for your backup choice.

Simplest backup ever: restic/Borg on a folder on the same PC. Not very recommendable, but indeed a good starting point.

Zfs/brtfs seems a complex solution for a simple problem. True is that once you start eating you get hungrier so maybe worthwhile.

[–] kellyaster@lemmy.world 7 points 2 weeks ago

For those on the fence about Borg Backup because it's a command line app, FYI there's a great frontend GUI for it called Vorta (yeah, in line with the Trek theme lol) that works really well. I don't see it mentioned often, thought I'd pass that along. Might want to avoid the Flatpak version if you need to back up stuff outside your /home dir.

[–] Boomkop3@reddthat.com 1 points 2 weeks ago

actually I was just looking for that! Thank you!

Thanks for sharing about Backrest. I use Restic and Backrest looks like a great addition to it.

[–] PhilipTheBucket@ponder.cat 7 points 2 weeks ago

Borg borg borg

You can combine it with a FUSE mount of the Google Drive, I’m not sure if that works but I don’t see why it wouldn’t.

[–] ninekeysdown@lemmy.world 7 points 2 weeks ago

Restic, it has native S3 compatibility and when you combine with something like B2 it makes amazing offsite storage so you can enjoy the tried and true 3-2-1 backup strategy.

Also fedora magazine did a few posts on setting it up with systemd that makes it SUPER EASY to get going if you need a guide.

I have an ansible role that configures it on everyone’s laptops so that they have local, NAS, and remote, B2, backup locations.

Works like a charm for the past 8+ years.

[–] atzanteol@sh.itjust.works 5 points 2 weeks ago

rclone & restic work okay together to create backups in a Google drive mount. There are "issues" with backing up to Google drive since it doesn't guarantee file names are unique which is... a choice... but it should be reliable enough.

[–] Atherel@lemmy.dbzer0.com 3 points 2 weeks ago

I use duplicacy, it's free as cli and pretty cheap if you want to manage the backup via gui. Restore by gui is always free and I would recommend it because it's way easier to navigate the backups if you want to restore single files or folders.

[–] axzxc1236@lemm.ee 2 points 2 weeks ago* (last edited 2 weeks ago)

simplest tool to backup to Google drive

Without the need for versioning, I think rclone fits the description. For backup into USB drive / remote SSH server I would recommend rsync.

I just uh, wrote a bash script that does it.

It dumps databases as needed, and then makes a single tarball of each service. Or a couple depending on what needs doing to ensure a full backup of the data.

Once all the services are backed up, I just push all the data to a S3 bucket, but you could use rclone or whatever instead.

It's not some fancy cool toy kids these days love like any of the dozens of other backup options, but I'm a fan of simple and well, a couple of tarballs in a S3 bucket is about as simple as it gets since restoring doesn't require any tools or configuration or anything: just snag the tarballs you need, unarchive them, done.

I also use a couple of tools for monitoring the progress and a separate script that can do a full restore to make sure shit works, but that's mostly just doing what you did to make and upload the tarballs backwards.

[–] GrapinoSubmarino@lemmy.world 1 points 2 weeks ago (1 children)

I had use Duplicati and Kopia. Duplicati works kinda well, the problem is the installation is such a pain in the ass, actually it never work as intended, that's why I switched to Kopia, the installation is a lot easier, have GUI and and system tray icon, have better documentation, the Google drive backups with GUI requires a liltle configuration of rClone , nothing crazy

[–] MangoPenguin@lemmy.blahaj.zone 2 points 2 weeks ago

Backrest is also great, just a nice webUI for Restic.

[–] talkingpumpkin@lemmy.world 1 points 2 weeks ago

For those kind of issues I'd recommend snapshots instead of backups