Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. How do you backup?

How do you backup?

Scheduled Pinned Locked Moved Linux
linux
61 Posts 50 Posters 370 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z [email protected]

    I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
    It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

    But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

    S This user is from outside of this forum
    S This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #37
    1. My KVM hosts use “virsh backup begin” to make full backups nightly.

    2. All machines, including the KVM hosts and laptops, use rsync with --link-dest to create daily incremental versioned backups on my main backup server.

    3. The main backup server pushes client-side encrypted backups which include the latest daily snapshot for every system to rsync.net via Borg.

    4. I also have 2 DASs with 2 22TB encrypted drives in each. One of these is plugged into the backup server while the other one sits powered off in a drawer in my desk at work. The main backup server pushes all backups to this DAS weekly and I swap the two DASs ~monthly so the one in my desk at work is never more than a month or so out of date.

    1 Reply Last reply
    0
    • Z [email protected]

      I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
      It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

      But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

      tasankovasara@sopuli.xyzT This user is from outside of this forum
      tasankovasara@sopuli.xyzT This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #38
      • daily important stuff (job stuff, Documents folder, Renoise mods) is kept synced between laptop, desktop and home server via Syncthing. A vimwiki additionally also on the phone. Sync happens only when on home network.

      • the rest of the laptop and desktop I'll roll into a tar backup every now and then with a quick bash alias. The tar files also get synced onto home server's big file system (2 TB ssd) via Syncthing.

      • clever thing is that the 2 TB ssd replaced an old 2 TB spinning disk. I kept the old disk and set up a systemd thing that keeps it spun down, but starts and mounts it once a week and rsyncs the changes to the ssd over, then unmounts it so that it sleeps again for a week. That old drive is likely to serve for years still with this frugal use.

      O 1 Reply Last reply
      0
      • S [email protected]

        It’s not a drawback because rsync has supported incremental versioned backups for over a decade, you just have to use the --link-dest flag and add a couple lines of code around it for management.

        E This user is from outside of this forum
        E This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #39

        Sure, but that's not in their answer.

        S 1 Reply Last reply
        0
        • E [email protected]

          Sure, but that's not in their answer.

          S This user is from outside of this forum
          S This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #40

          They didn't provide an rsync example until later in the post, the comment about not supporting differential backups is in reference to using rsync itself, which is incorrect, because rsync does support differential backups.

          I agree with you that not doing differential backups is a problem, I'm simply commenting that this is not a drawback of using rsync, it's an implementation problem on the user's part. It would be like somebody saying "I like my Rav4, it's just problematic because I don't go to the grocery store with it" and someone else saying "that's a big drawback, the grocery store has a lot of important items and you need to be able to go to it". While true, it's based on a faulty premise, because of course a Rav4 can go to the grocery store like any other car, it's a non-issue to begin with. OP just needs to fix their backup script to start doing differential backups.

          E 1 Reply Last reply
          0
          • Z [email protected]

            I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
            It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

            But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

            J This user is from outside of this forum
            J This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #41

            Right now, nothing 😈 (but my dotfiles/etc configs live on several machines)

            Before, I used Restic (incremental, encrypted backup over network), which I really liked. I think I should set it up again.

            1 Reply Last reply
            0
            • S [email protected]

              They didn't provide an rsync example until later in the post, the comment about not supporting differential backups is in reference to using rsync itself, which is incorrect, because rsync does support differential backups.

              I agree with you that not doing differential backups is a problem, I'm simply commenting that this is not a drawback of using rsync, it's an implementation problem on the user's part. It would be like somebody saying "I like my Rav4, it's just problematic because I don't go to the grocery store with it" and someone else saying "that's a big drawback, the grocery store has a lot of important items and you need to be able to go to it". While true, it's based on a faulty premise, because of course a Rav4 can go to the grocery store like any other car, it's a non-issue to begin with. OP just needs to fix their backup script to start doing differential backups.

              E This user is from outside of this forum
              E This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #42

              My one and only purpose was to warn them that their "drawback" is more of a gator pit. It's noble that you're here defending rsync's honor, but maybe let them know instead? My preferred backup tool has "don't eat my data" mode on by default.

              1 Reply Last reply
              0
              • G [email protected]

                I'm curious, is there a reason why noone uses deja-dup? I use it with an external SSD on Ubuntu and (receently) Mint, where it comes pre-installed, and did not encounter Problems.

                ? Offline
                ? Offline
                Guest
                wrote on last edited by
                #43

                The restore process takes forever and sometimes fails. Last time I was forced to try every daily backup to several days before last backup to find one that could actually be restored. I have switched to borg (using Pika Backup for desktop and Borgmatic for servers). No restores have failed since.

                G 1 Reply Last reply
                0
                • Z [email protected]

                  I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                  It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                  But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                  tiny@midwest.socialT This user is from outside of this forum
                  tiny@midwest.socialT This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #44

                  All my configs are in gitlab or a self hosted forgejo server and all files are in seafile or a self hosted service running on proxmox. Then I use proxmox backup server on a storage VPS for off-site backup

                  1 Reply Last reply
                  0
                  • Z [email protected]

                    I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                    It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                    But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                    golden_zealot@lemmy.mlG This user is from outside of this forum
                    golden_zealot@lemmy.mlG This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #45

                    Using timeshift. Very, very easy, works great.

                    1 Reply Last reply
                    0
                    • Z [email protected]

                      I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                      It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                      But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                      E This user is from outside of this forum
                      E This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #46

                      I have a server with a RAID-1 array, that makes daily, weekly, and monthly read only btrfs snapshots. The whole thing (sans snapshots) is sync'd with syncthing to two rPi's in two different geographic locations.

                      I know neither raid nor syncthing are "real" backup solutions, but with so many copies of the files living in so many locations (in addition to my phone, laptop, etc.) I'm reasonably confident its a decent solution.

                      1 Reply Last reply
                      0
                      • Z [email protected]

                        I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                        It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                        But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                        data1701d@startrek.websiteD This user is from outside of this forum
                        data1701d@startrek.websiteD This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #47

                        Borg Backup, whenever I feel like it - usually monthly.

                        1 Reply Last reply
                        0
                        • Z [email protected]

                          I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                          It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                          But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                          C This user is from outside of this forum
                          C This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #48

                          I use external drive for my important data and if my system is borked (which never happen to me) I just reinstall the OS

                          F 1 Reply Last reply
                          0
                          • M [email protected]

                            What do you backup with dejadup? Everything under /home?

                            G This user is from outside of this forum
                            G This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #49

                            Mostly, with some folders excepted (e.g. my Nextcloud folder)

                            1 Reply Last reply
                            0
                            • ? Guest

                              The restore process takes forever and sometimes fails. Last time I was forced to try every daily backup to several days before last backup to find one that could actually be restored. I have switched to borg (using Pika Backup for desktop and Borgmatic for servers). No restores have failed since.

                              G This user is from outside of this forum
                              G This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #50

                              Thanks for your feedback, maybe I should look into switching

                              1 Reply Last reply
                              0
                              • Z [email protected]

                                I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                                It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                                But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                                H This user is from outside of this forum
                                H This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #51
                                • Offline Backup on 2 separate HDD/SSD
                                • Backup on HDD within my desktop pc
                                • Backup offsite with restic to Hetzner Storage Box
                                1 Reply Last reply
                                0
                                • C [email protected]

                                  I use external drive for my important data and if my system is borked (which never happen to me) I just reinstall the OS

                                  F This user is from outside of this forum
                                  F This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #52

                                  External drives are more prone to damage and failures, both because they're more likely to be dropped/bumped/spilled on etc, and because of generally cheaper construction compared to internal drives. In the case of SSDs the difference might be negligible, but I suggest you at least make a copy on another "cold" external drive if the data is actually important

                                  1 Reply Last reply
                                  0
                                  • Z [email protected]

                                    I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                                    It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                                    But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                                    H This user is from outside of this forum
                                    H This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #53

                                    I use Duplicacy to backup to my TrueNAS server. Crucial data like documents are backed up a second time to my GDrive, also using Duplicacy. Sadly it's a paid solution, but it works great for me.

                                    1 Reply Last reply
                                    0
                                    • Z [email protected]

                                      I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                                      It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                                      But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                                      T This user is from outside of this forum
                                      T This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #54

                                      Borg daily to the local drive then copied across to a USB drive, then weekly to cloud storage. Script is triggered by daily runs of topgrade before I do any updates

                                      1 Reply Last reply
                                      0
                                      • Z [email protected]

                                        I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                                        It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                                        But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                                        B This user is from outside of this forum
                                        B This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #55

                                        I created a script that I dropped into /etc/cron.hourly which does the following:

                                        1. Use rsync to mirror my root partition to a btrfs partition on another hard drive (which only updates modified files).
                                        2. Use btrfs subvolume snapshot to create a snapshot of that mirror (which only uses additional storage for modified files).
                                        3. Moves "old" snapshots into a trash directory so I can delete them later if I want to save space.

                                        It is as follows:

                                        #!/usr/bin/env python
                                        from datetime import datetime, timedelta
                                        import os
                                        import pathlib
                                        import shutil
                                        import subprocess
                                        import sys
                                        
                                        import portalocker
                                        
                                        DATETIME_FORMAT = '%Y-%m-%d-%H%M'
                                        BACKUP_DIRECTORY = pathlib.Path('/backups/internal')
                                        MIRROR_DIRECTORY = BACKUP_DIRECTORY / 'mirror'
                                        SNAPSHOT_DIRECTORY = BACKUP_DIRECTORY / 'snapshots'
                                        TRASH_DIRECTORY = BACKUP_DIRECTORY / 'trash'
                                        
                                        EXCLUDED = [
                                            '/backups',
                                            '/dev',
                                            '/media',
                                            '/lost+found',
                                            '/mnt',
                                            '/nix',
                                            '/proc',
                                            '/run',
                                            '/sys',
                                            '/tmp',
                                            '/var',
                                        
                                            '/home/*/.cache',
                                            '/home/*/.local/share/flatpak',
                                            '/home/*/.local/share/Trash',
                                            '/home/*/.steam',
                                            '/home/*/Downloads',
                                            '/home/*/Trash',
                                        ]
                                        
                                        OPTIONS = [
                                            '-avAXH',
                                            '--delete',
                                            '--delete-excluded',
                                            '--numeric-ids',
                                            '--relative',
                                            '--progress',
                                        ]
                                        
                                        def execute(command, *options):
                                            print('>', command, *options)
                                            subprocess.run((command,) + options).check_returncode()
                                        
                                        execute(
                                            '/usr/bin/mount',
                                            '-o', 'rw,remount',
                                            BACKUP_DIRECTORY,
                                        )
                                        
                                        try:
                                            with portalocker.Lock(os.path.join(BACKUP_DIRECTORY,'lock')):
                                                execute(
                                                    '/usr/bin/rsync',
                                                    '/',
                                                    MIRROR_DIRECTORY,
                                                    *(
                                                        OPTIONS
                                                        +
                                                        [f'--exclude={excluded_path}' for excluded_path in EXCLUDED]
                                                    )
                                                )
                                        
                                                execute(
                                                    '/usr/bin/btrfs',
                                                    'subvolume',
                                                    'snapshot',
                                                    '-r',
                                                    MIRROR_DIRECTORY,
                                                    SNAPSHOT_DIRECTORY / datetime.now().strftime(DATETIME_FORMAT),
                                                )
                                        
                                                snapshot_datetimes = sorted(
                                                    (
                                                        datetime.strptime(filename, DATETIME_FORMAT)
                                                        for filename in os.listdir(SNAPSHOT_DIRECTORY)
                                                    ),
                                                )
                                        
                                                # Keep the last 24 hours of snapshot_datetimes
                                                one_day_ago = datetime.now() - timedelta(days=1)
                                                while snapshot_datetimes and snapshot_datetimes[-1] >= one_day_ago:
                                                    snapshot_datetimes.pop()
                                        
                                                # Helper function for selecting all of the snapshot_datetimes for a given day/month
                                                def prune_all_with(get_metric):
                                                    this = get_metric(snapshot_datetimes[-1])
                                                    snapshot_datetimes.pop()
                                                    while snapshot_datetimes and get_metric(snapshot_datetimes[-1]) == this:
                                                        snapshot = SNAPSHOT_DIRECTORY / snapshot_datetimes[-1].strftime(DATETIME_FORMAT)
                                                        snapshot_datetimes.pop()
                                                        execute('/usr/bin/btrfs', 'property', 'set', '-ts', snapshot, 'ro', 'false')
                                                        shutil.move(snapshot, TRASH_DIRECTORY)
                                        
                                                # Keep daily snapshot_datetimes for the last month
                                                last_daily_to_keep = datetime.now().date() - timedelta(days=30)
                                                while snapshot_datetimes and snapshot_datetimes[-1].date() >= last_daily_to_keep:
                                                    prune_all_with(lambda x: x.date())
                                        
                                                # Keep weekly snapshot_datetimes for the last three month
                                                last_weekly_to_keep = datetime.now().date() - timedelta(days=90)
                                                while snapshot_datetimes and snapshot_datetimes[-1].date() >= last_weekly_to_keep:
                                                    prune_all_with(lambda x: x.date().isocalendar().week)
                                        
                                                # Keep monthly snapshot_datetimes forever
                                                while snapshot_datetimes:
                                                    prune_all_with(lambda x: x.date().month)
                                        except portalocker.AlreadyLocked:
                                            sys.exit('Backup already in progress.')
                                        finally:
                                            execute(
                                                '/usr/bin/mount',
                                                '-o', 'ro,remount',
                                                BACKUP_DIRECTORY,
                                            )
                                        
                                        1 Reply Last reply
                                        0
                                        • Z [email protected]

                                          I recently implemented a backup workflow for me. I heavily use restic for desktop backup and for a full system backup of my local server.
                                          It works amazingly good. I always have a versioned backup without a lot of redundant data. It is fast, encrypted and compressed.

                                          But I wondered, how do you guys do your backups? What software do you use? How often do you do them and what workflow do you use for it?

                                          H This user is from outside of this forum
                                          H This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #56

                                          I use Pika Backup (GUI that uses Borg Backup on the backend) to back up my desktop to my home server daily, then overnight that server has a daily backup using Borg to a Hetzner Storage Box. It's easy to set it and forget it (other than maybe verifying the backups every once in a while), and having that off site back up gives me peace of mind.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups