Hello,
Before opening an issue on restic, I wanted to verify that I’m using lxc correctly.
I want to backup a dump to restic from a container via the LXD host.
The dump itself is working perfectly:
root@asuna ~# time lxc exec mysql -- mysqldump archive > dump.sql
0.13user 0.24system 0:00.93elapsed 40%CPU (0avgtext+0avgdata 19912maxresident)k
0inputs+40056outputs (0major+5428minor)pagefaults 0swaps
root@asuna ~# du -hs dump.sql
20M dump.sql
root@asuna ~# lxc exec mysql -- mysqldump archive | head
-- MySQL dump 10.17 Distrib 10.3.13-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: archive
-- ------------------------------------------------------
-- Server version 10.3.13-MariaDB-1:10.3.13+maria~stretch-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
But piping the dump to restic does not work:
root@asuna ~# lxc exec mysql -- mysqldump archive | restic backup --verbose --stdin --stdin-filename archive.sql
open repository
repository 9e543735 opened successfully, password is correct
lock repository
load index files
using parent snapshot bad59229
read data from stdin
start scan on [archive.sql]
start backup on [archive.sql]
scan finished in 1.985s: 1 files, 0 B
[1:10] 0 files 0 B, total 1 files 0 B, 0 errors
/archive.sql
It just runs indefinitely. FYI it works fine when using mysqldump | restic
directly.