datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
576 stars 122 forks source link

Installation Problem #133

Closed 02ebz06 closed 6 years ago

02ebz06 commented 6 years ago

Don't know if this is right place to post this, but hope so. If not, please point me in the right direction.

Having difficulty with the install on Debian Stretch.

Installation instructions in the INSTALL,md page for Debian/Ubuntu are: _sudo apt-key adv --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 echo "deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/$(lsb_release -sc) $(lsbrelease -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list sudo apt-get update sudo apt-get install dattobd-dkms dattobd-utils

That errored on first line getting the key.

I found another document saying the the INSTALL.md is being updated for the Debian/Ubuntu section replacing the the first two commands with these: _sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 29FF164C echo "deb https://cpkg.datto.com/repositories $(lsbrelease -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list

Also, it looked like the change remove Debian from Debian/Ubuntu. I tried it anyway and first line ran without error. but the "apt-get update" generated errors about being invalid and unsigned key. So, I guess there is not an appropriate key for Debian ??? Does that mean Dattobd is not supported on Debian?

Here are the error lines: W: GPG error: https://cpkg.datto.com/repositories stretch InRelease: The following signatures were invalid: D60DBD564DB3CE46591058595E99242593C3C8D9 W: The repository 'https://cpkg.datto.com/repositories stretch InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.

Thanks for any help, Bruce

Conan-Kudo commented 6 years ago

We changed repository implementations to remain compatible with Debian 9's change to how strong GPG keys needed to be.

My local test indicates that the following works:

ngompa@debian9:~$ sudo apt-key adv --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407
Executing: /tmp/apt-key-gpghome.K2RfoPKb0C/gpg.1.sh --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407
gpg: key 370C85D709D26407: public key "Datto, Inc (Datto Software Packages) <swpackages@datto.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
ngompa@debian9:~$ echo "deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/$(lsb_release -sc) $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list
deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/stretch stretch main
ngompa@debian9:~$ sudo apt update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch Release
Get:7 https://cpkg.datto.com/datto-deb/public/stretch stretch InRelease [3172 B]
Get:9 https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages [3725 B]
Reading package lists... Done
ngompa@debian9:~$ sudo apt show dattobd-dkms
Package: dattobd-dkms
Version: 0.10.4-17.1debian9
Priority: optional
Section: kernel
Maintainer: Datto Software Packagers <swpackages@datto.com>
Installed-Size: 184 kB
Pre-Depends: dkms
Depends: dkms
Homepage: https://github.com/datto/dattobd
Download-Size: 36.7 kB
APT-Sources: https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages
Description: Kernel module source for dattobd managed by DKMS
 Kernel module sources for dattobd for DKMS to
 automatically build and install for each kernel.
02ebz06 commented 6 years ago

Thank you, I will try it.

On Sun, Mar 4, 2018 at 1:57 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

We changed repository implementations to remain compatible with Debian 9's change to how strong GPG keys needed to be.

My local test indicates that the following works:

ngompa@debian9:~$ sudo apt-key adv --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 Executing: /tmp/apt-key-gpghome.K2RfoPKb0C/gpg.1.sh --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 gpg: key 370C85D709D26407: public key "Datto, Inc (Datto Software Packages) swpackages@datto.com" imported gpg: Total number processed: 1 gpg: imported: 1 ngompa@debian9:~$ echo "deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/$(lsb_release -sc) $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/stretch stretch main ngompa@debian9:~$ sudo apt update Ign:1 http://deb.debian.org/debian stretch InRelease Hit:3 http://deb.debian.org/debian stretch Release Get:7 https://cpkg.datto.com/datto-deb/public/stretch stretch InRelease [3172 B] Get:9 https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages [3725 B] Reading package lists... Done ngompa@debian9:~$ sudo apt show dattobd-dkms Package: dattobd-dkms Version: 0.10.4-17.1debian9 Priority: optional Section: kernel Maintainer: Datto Software Packagers swpackages@datto.com Installed-Size: 184 kB Pre-Depends: dkms Depends: dkms Homepage: https://github.com/datto/dattobd Download-Size https://github.com/datto/dattobdDownload-Size: 36.7 kB APT-Sources: https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages Description: Kernel module source for dattobd managed by DKMS Kernel module sources for dattobd for DKMS to automatically build and install for each kernel.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370212871, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-F-O18QMpD-a_MTMfbO4kteIe6P9ks5ta6yJgaJpZM4SVSO3 .

02ebz06 commented 6 years ago

I get an error on first command:

sudo apt-key adv --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 Executing: /tmp/apt-key-gpghome.dXNfev8hCp/gpg.1.sh --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 gpg: keyserver receive failed: Address family not supported by protocol

On Sun, Mar 4, 2018 at 1:57 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

We changed repository implementations to remain compatible with Debian 9's change to how strong GPG keys needed to be.

My local test indicates that the following works:

ngompa@debian9:~$ sudo apt-key adv --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 Executing: /tmp/apt-key-gpghome.K2RfoPKb0C/gpg.1.sh --recv-keys --keyserver keys.fedoraproject.org 370C85D709D26407 gpg: key 370C85D709D26407: public key "Datto, Inc (Datto Software Packages) swpackages@datto.com" imported gpg: Total number processed: 1 gpg: imported: 1 ngompa@debian9:~$ echo "deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/$(lsb_release -sc) $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/stretch stretch main ngompa@debian9:~$ sudo apt update Ign:1 http://deb.debian.org/debian stretch InRelease Hit:3 http://deb.debian.org/debian stretch Release Get:7 https://cpkg.datto.com/datto-deb/public/stretch stretch InRelease [3172 B] Get:9 https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages [3725 B] Reading package lists... Done ngompa@debian9:~$ sudo apt show dattobd-dkms Package: dattobd-dkms Version: 0.10.4-17.1debian9 Priority: optional Section: kernel Maintainer: Datto Software Packagers swpackages@datto.com Installed-Size: 184 kB Pre-Depends: dkms Depends: dkms Homepage: https://github.com/datto/dattobd Download-Size https://github.com/datto/dattobdDownload-Size: 36.7 kB APT-Sources: https://cpkg.datto.com/datto-deb/public/stretch stretch/main amd64 Packages Description: Kernel module source for dattobd managed by DKMS Kernel module sources for dattobd for DKMS to automatically build and install for each kernel.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370212871, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-F-O18QMpD-a_MTMfbO4kteIe6P9ks5ta6yJgaJpZM4SVSO3 .

Conan-Kudo commented 6 years ago

@02ebz06 That seems like something is wrong with your gpg setup. I'm not sure what's going on there...

02ebz06 commented 6 years ago

I just did some more googling and found this:

GnuPG can fail to import the key when IPv6 is not available:

$ gpg --keyserver hkp://keys.gnupg.net http://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 gpg: keyserver receive failed: Address family not supported by protocol

Workaround: use IPv4-only keyserver (ipv4.pool.sks-keyservers.net http://ipv4.pool.sks-keyservers.net, for example). ​ ​I do not have IPV6 running on my Linux Systems. Is there an IPV4 Key Server I can use to get the key?​

On Mon, Mar 5, 2018 at 6:32 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

@02ebz06 https://github.com/02ebz06 That seems like something is wrong with your gpg setup. I'm not sure what's going on there...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370419744, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-PPjUZzcjUGPTvmsNJAJTPLqWHbHks5tbT6AgaJpZM4SVSO3 .

Conan-Kudo commented 6 years ago

@02ebz06 The Fedora keyserver replicates to many other SKS systems. You can try ipv4.pool.sks-keyservers.net if you'd like.

02ebz06 commented 6 years ago

The key installed OK but now I get these errors when I do the "apt-get update":

W: GPG error: https://cpkg.datto.com/repositories stretch InRelease: The following signatures were invalid: D60DBD564DB3CE46591058595E99242593C3C8D9 W: The repository 'https://cpkg.datto.com/repositories stretch InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.

On Mon, Mar 5, 2018 at 2:00 PM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

@02ebz06 https://github.com/02ebz06 The Fedora keyserver replicates to many other SKS systems. You can try ipv4.pool.sks-keyservers.net if you'd like.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370563768, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-JI_TdTNbsXb7w8dVm98KoDJtIPYks5tbadygaJpZM4SVSO3 .

Conan-Kudo commented 6 years ago

Remove the old repository from your /etc/apt/sources.list.d/datto-linux-agent.list and use the new one.

02ebz06 commented 6 years ago

Sorry, I missed that change.

Everything worked fine and installed OK.

Thank you very much for your help.

On Tue, Mar 6, 2018 at 10:54 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

Remove the old repository from your /etc/apt/sources.list.d/datto- linux-agent.list and use the new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370869384, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-OVkOY5EsFQYBh0yjJzLKqRr7YWOks5tbs1BgaJpZM4SVSO3 .

02ebz06 commented 6 years ago

After rebooting, this message is in syslog: --> dattobd: loading out-of-tree module taints kernel Is that normal, will it cause problems?

On Tue, Mar 6, 2018 at 10:54 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

Remove the old repository from your /etc/apt/sources.list.d/datto- linux-agent.list and use the new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370869384, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-OVkOY5EsFQYBh0yjJzLKqRr7YWOks5tbs1BgaJpZM4SVSO3 .

nixomose commented 6 years ago

That's expected. Not a problem.

On March 6, 2018 2:09:01 PM EST, 02ebz06 notifications@github.com wrote:

After rebooting, this message is in syslog: --> dattobd: loading out-of-tree module taints kernel Is that normal, will it cause problems?

On Tue, Mar 6, 2018 at 10:54 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

Remove the old repository from your /etc/apt/sources.list.d/datto- linux-agent.list and use the new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370869384, or mute the thread

https://github.com/notifications/unsubscribe-auth/AjKF-OVkOY5EsFQYBh0yjJzLKqRr7YWOks5tbs1BgaJpZM4SVSO3 .

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/datto/dattobd/issues/133#issuecomment-370892829

02ebz06 commented 6 years ago

Sorry to bug you again, but I think I may have a problem.

My system disk is 500GB with less than 10GB used. I have two mount points to other disks on it. One is 3TB the other is 10TB in size. Will the snapshot get those too? Can that be prevented?

Just creating the snapshot raised the used space on my system disk to 47GB. Four times normal. In the manual it says to use a dd command to back a backup of /dev/datto0 now the dd command has raised used space to over 80GB.

If it goes too far I will kill the dd command.

On Tue, Mar 6, 2018 at 10:54 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

Remove the old repository from your /etc/apt/sources.list.d/datto- linux-agent.list and use the new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-370869384, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-OVkOY5EsFQYBh0yjJzLKqRr7YWOks5tbs1BgaJpZM4SVSO3 .

nixomose commented 6 years ago

The snapshot, snaps a block device. It will only snap one block device per snapshot, it does not automatically follow mounts and snap those block devices too. If you've got 3 mount points, you'd need to snapshot those 3 block devices individually.

When you dd the snapshot, you're going to get a copy of the block device's snapshot, which means the backup will have an empty directory where the mountpoint for the other drive is.

While the snapshot is active, dattobd will use about 10% of your disk space per volume to handle changes to the disk while the snapshot is active, that's where your space is going.

02ebz06 commented 6 years ago

The directions say to copy the contents of /dev/datto0 off the device to an image with a dd command --> dd if=/dev/datto0 of=/backups/sda1-bkp bs=1M My /dev/sda1 is 500GB with only 10GB used. So I guess it was copying all 500GB, correct?

OK, so after the image is created i put it into Incremental mode --> dbdctl transition-to-incremental 0 to track block changes

My backup program (urbackup) allows for pre and post scripts to run. So, if I have this right I would put this in the pre script:

Pre-backup script

dbdctl transition-to-snapshot /.datto1 0           # Change back to

snapshot mode with new file /.datto1 instead of /.datto0 update-img /dev/datto0 /.datto /backups/sda1-bkp # Update image (/backups/sda1-bkp) with the blocks that changed in /.datto0 rm /.datto0

*Once complete, my backup program runs. Now do I tell it to only backup

the /backups/sda1-bkp image?*

# Post-Backup script
dbdctl transition-to-incremental 0                 # go back to

incremental mode.

On Tue, Mar 6, 2018 at 7:43 PM, nixomose notifications@github.com wrote:

The snapshot, snaps a block device. It will only snap one block device per snapshot, it does not automatically follow mounts and snap those block devices too. If you've got 3 mount points, you'd need to snapshot those 3 block devices individually.

When you dd the snapshot, you're going to get a copy of the block device's snapshot, which means the backup will have an empty directory where the mountpoint for the other drive is.

While the snapshot is active, dattobd will use about 10% of your disk space per volume to handle changes to the disk while the snapshot is active, that's where your space is going.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-371003465, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-IaTrWt8qfyyF4AX4T3-pZwn8xsmks5tb0lEgaJpZM4SVSO3 .

02ebz06 commented 6 years ago

OK, I should have known that. The dd command will create a 500GB image file, same size as disk capacity.

After the image is created , I switch to incremental mode --> dbdctl transition-to-incremental 0 Stays that way until backup time.

Please correct me if I'm wrong with my assumptions below for doing a backup..

Pre-Backup script

dbdctl transition-to-snapshot /.datto1 0 # Back to snapshot mode with new file name /.datto1 update-img /dev/datto0 /.datto /backups/sda1-bkp # Update the image with the changed blocks from /.datto0 rm /.datto0 # Remove /.datto0 now that we are done with it.

Backup runs and "only" backs up from the image /backups/sda1-bkp # Is that correct ?

Post-Backup script

dbdctl transition-to-incremental 0

The Pre-Backup script will need some code, and a flag file, to keep track of which file contains the changed blocks, /.datto0 or /.datto1. I assume I can bounce back and forth between the two.

On Tue, Mar 6, 2018 at 7:43 PM, nixomose notifications@github.com wrote:

The snapshot, snaps a block device. It will only snap one block device per snapshot, it does not automatically follow mounts and snap those block devices too. If you've got 3 mount points, you'd need to snapshot those 3 block devices individually.

When you dd the snapshot, you're going to get a copy of the block device's snapshot, which means the backup will have an empty directory where the mountpoint for the other drive is.

While the snapshot is active, dattobd will use about 10% of your disk space per volume to handle changes to the disk while the snapshot is active, that's where your space is going.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-371003465, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-IaTrWt8qfyyF4AX4T3-pZwn8xsmks5tb0lEgaJpZM4SVSO3 .

02ebz06 commented 6 years ago

Sorry, first message sent today at 8:34 MST USA was incomplete and sent by mistake. The one at 8:55 MST USA is what I intended to send.

On Tue, Mar 6, 2018 at 7:43 PM, nixomose notifications@github.com wrote:

The snapshot, snaps a block device. It will only snap one block device per snapshot, it does not automatically follow mounts and snap those block devices too. If you've got 3 mount points, you'd need to snapshot those 3 block devices individually.

When you dd the snapshot, you're going to get a copy of the block device's snapshot, which means the backup will have an empty directory where the mountpoint for the other drive is.

While the snapshot is active, dattobd will use about 10% of your disk space per volume to handle changes to the disk while the snapshot is active, that's where your space is going.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-371003465, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-IaTrWt8qfyyF4AX4T3-pZwn8xsmks5tb0lEgaJpZM4SVSO3 .

nixomose commented 6 years ago

you've got it basically right. you transition to snapshot, run update-img to take the incremental tracking changes and apply them to the existing full dd image, then you transition back to incremental.

And yes you have to bounce back and forth between two files because one is in use by dattobd at all times it is in use. Alternatively you can just tack an ever increasing number on to the end, it just has to be a different file name

02ebz06 commented 6 years ago

Thanks for info. I'm having a discussion about this with the backup developer. At present the backup code doesn't support dattobd on Debian. From what I understand, he was under the impression that dattodb was not readily available for Debian. So, I think he is going to update his code.

I do have another question for you. After a reboot, the /dev/datto0 is gone. How do you keep that around?

On Fri, Mar 9, 2018 at 6:07 PM, nixomose notifications@github.com wrote:

you've got it basically right. you transition to snapshot, run update-img to take the incremental tracking changes and apply them to the existing full dd image, then you transition back to incremental.

And yes you have to bounce back and forth between two files because one is in use by dattobd at all times it is in use. Alternatively you can just tack an ever increasing number on to the end, it just has to be a different file name

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-371988534, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-JE99lo488vuDxOu2NKBD-gtWcyOks5tcydWgaJpZM4SVSO3 .

Conan-Kudo commented 6 years ago

At present the backup code doesn't support dattobd on Debian. From what I understand, he was under the impression that dattodb was not readily available for Debian.

We officially support all of the following:

The up to date information is always in INSTALL.md.

02ebz06 commented 6 years ago

Yes, I let him know.

Thanks

On Sat, Mar 10, 2018 at 10:35 AM, Neal Gompa (ニール・ゴンパ) < notifications@github.com> wrote:

At present the backup code doesn't support dattobd on Debian. From what I understand, he was under the impression that dattodb was not readily available for Debian.

We officially support all of the following:

  • Currently supported Fedora releases
  • Currently supported Red Hat Enterprise Linux/CentOS/Scientific Linux releases
  • Currently supported OpenSUSE Leap releases
  • SUSE Linux Enterprise 11 SP4 and higher
  • Currently supported Ubuntu LTS releases
  • Debian 8.0 (Jessie) and Debian 9.0 (Stretch)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/datto/dattobd/issues/133#issuecomment-372047837, or mute the thread https://github.com/notifications/unsubscribe-auth/AjKF-B0I1dbuyMCvYAYLD8-ayRNHi5cvks5tdA7tgaJpZM4SVSO3 .