Announcement

Collapse
No announcement yet.

Programs for Backing Up Over SSH?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Programs for Backing Up Over SSH?

    I'm going to be using my home server as a BTRFS backup server while I stay in Japan, but I'm not very familiar with network backups.

    What programs would you recommend for this? I'm considering buttersink, but if there are better ones that are more used, I would like to use those.

    Thanks!

    #2
    Buttersync sounds like the perfect choice if you're btrfs on both ends. There's plenty of other options though. I assume you've been here. Using incremental backups will be a must. I would set up password-less ssh using a secure private key and do a full backup locally before you leave. Then just incrementally do your backups. If you have ssh set up, you can actually just send|receive over the ssh connection. Might make things easier to add the "btrfs" command to sudoers.d on both machines before leaving so you don't have to use sudo constantly.

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      Buttersync sounds like the perfect choice if you're btrfs on both ends. There's plenty of other options though. I assume you've been here. Using incremental backups will be a must. I would set up password-less ssh using a secure private key and do a full backup locally before you leave. Then just incrementally do your backups. If you have ssh set up, you can actually just send|receive over the ssh connection. Might make things easier to add the "btrfs" command to sudoers.d on both machines before leaving so you don't have to use sudo constantly.
      Yeah, that's kind of the problem that I'm having. I can't figure out how to use buttersink with the ssh server that I have set up.

      I followed https://www.digitalocean.com/communi...on-ubuntu-1604
      's tutorial on setting up paswordless entry, and now I can't figure out how to get it to work with buttersink.

      I have a custom port number and password disabled (Key only).

      How I can get buttersync to work with this I don't know.

      It has no man page and the help doc is... cryptic...

      Not sure where to go from here. How do you typically do backups to a remote server?

      Comment


        #4
        Like any other ssh command;

        sudo btrfs send /snapshots/homebckup | ssh <USERNAME>@<REMOTEPC> “sudo btrfs receive /backups/home”

        This is why I suggested putting /bin/btrfs in sudoers.d so you don't need to use a root password. It will make life much easier. Also, "rsh" might work too instead of ssh. I don't know if it matters.

        To get btrfs user level permission, I created a file in /etc/sudoers.d/ using the visudo -f command and named it "btrfs". Here's the contents:

        stuart office.smith.lan = (root) NOPASSWD: /bin/btrfs

        The "office.smith.lan" is the fully qualified domain name of my desktop PC. This allow me to use btrfs without sudo. I had to reboot to get it to work the first time for some reason. The file must be root:root owned and permissions 0440. If you've got key only access to your server you're half way there. Do the sudoers thing on the server, log into it using ssh and test. Once you know that's working, then you have to expose the server ssh port to the internet. It's recommended not to use the standard port 22 to avoid some amount of attacks.

        Also, are you aware that with a config file you can log into your ssh command with a single word? In your ~/.ssh/ folder make a file named "config" and add your server like:

        Host server
        Port 22
        User sarah
        HostName server

        Obviously, use your info for port, username (on the server), and hostname of the server. This will get you to ssh access with "ssh server". To reduce it to a single word, add an alias in ~/.bash_aliases like;

        alias server='ssh server'

        This reduces ssh'ing in to a single word: server

        Please Read Me

        Comment

        Working...
        X