btrbck
btrbck copied to clipboard
Default subvolume error message
I'm trying to backup some subvolumes in my machine (localhost) to a remote server via ssh. I could manage to create the streams and actually push the first snapshot (0_date_blahblah file) of each stream succesfully, using btrbck push command like the following (for each stream)
btrbck -sudo -sudoRemoteBtrfs push -c myStreamX remote_server_alias /remote/server/path
That worked perfectly, I now have in my remoter server in the /remote/server/path the streams and first/original snapshots (the ones named 0_date_blahblah for each stream).
I then set up my repository.xml to do an automatic push via the btrbck process
command, then my repository.xml
file looks like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<applicationStreamRepository version="1">
<!-- The following is a sample sync configuration -->
<syncConfiguration
direction="PUSH"
sshTarget="remote_server_alias"
remoteRepoLocation="/remote/server/path"
createRemoteIfNecessary="true"
streamPatterns="*"/>
</applicationStreamRepository>
But when I do a btrbck -sudo -sudoRemoteBtrfs process
or even a btrbck push
command as stated before I'm now getting the following error message:
At subvol /lxc/backup/.backup/myStreamX/snapshots/3_2016-10-03T14:01:24.948-05:00
It seems that you have changed your default subvolume or you specify other subvolume to
mount btrfs, try to remount this btrfs filesystem with fs tree, and run btrfs receive again!
Exception in thread "main" java.lang.RuntimeException: Error while receiving snapshots
at com.github.ruediste1.btrbck.SnapshotTransferService.receiveSnapshots(SnapshotTransferService.java:135)
at com.github.ruediste1.btrbck.cli.CliMain.cmdReceiveSnapshots(CliMain.java:204)
at com.github.ruediste1.btrbck.cli.CliMain.processCommand(CliMain.java:147)
at com.github.ruediste1.btrbck.cli.CliMain.doMain(CliMain.java:113)
at com.github.ruediste1.btrbck.cli.CliMain.main(CliMain.java:100)
Caused by: java.lang.RuntimeException: java.io.IOException: Tubería rota
at com.github.ruediste1.btrbck.SnapshotTransferService$1.consume(SnapshotTransferService.java:299)
at com.github.ruediste1.btrbck.SnapshotTransferService$1.consume(SnapshotTransferService.java:1)
at com.github.ruediste1.btrbck.BtrfsService.receive(BtrfsService.java:132)
at com.github.ruediste1.btrbck.SnapshotTransferService.receiveMissingSnapshots(SnapshotTransferService.java:289)
at com.github.ruediste1.btrbck.SnapshotTransferService.receiveSnapshots(SnapshotTransferService.java:126)
... 4 more
Caused by: java.io.IOException: Tubería rota
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:345)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:179)
at com.github.ruediste1.btrbck.BlockTransferService.readBlocks(BlockTransferService.java:29)
at com.github.ruediste1.btrbck.SnapshotTransferService$1.consume(SnapshotTransferService.java:295)
... 8 more
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Error while sending snapshot
at com.github.ruediste1.btrbck.SnapshotTransferService.push(SnapshotTransferService.java:213)
at com.github.ruediste1.btrbck.cli.CliMain.cmdProcess(CliMain.java:304)
at com.github.ruediste1.btrbck.cli.CliMain.processCommand(CliMain.java:137)
at com.github.ruediste1.btrbck.cli.CliMain.doMain(CliMain.java:113)
at com.github.ruediste1.btrbck.cli.CliMain.main(CliMain.java:100)
Caused by: java.lang.RuntimeException: Error while sending snapshot
at com.github.ruediste1.btrbck.SnapshotTransferService$2.consume(SnapshotTransferService.java:363)
at com.github.ruediste1.btrbck.SnapshotTransferService$2.consume(SnapshotTransferService.java:1)
at com.github.ruediste1.btrbck.BtrfsService.send(BtrfsService.java:166)
at com.github.ruediste1.btrbck.SnapshotTransferService.sendMissingSnapshots(SnapshotTransferService.java:354)
at com.github.ruediste1.btrbck.SnapshotTransferService.push(SnapshotTransferService.java:205)
... 4 more
Caused by: java.io.IOException: Stream closed
at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:434)
at java.io.OutputStream.write(OutputStream.java:116)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1876)
at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1914)
at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1575)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:350)
at com.github.ruediste1.btrbck.Util.send(Util.java:142)
at com.github.ruediste1.btrbck.BlockTransferService.sendBlocks(BlockTransferService.java:53)
at com.github.ruediste1.btrbck.SnapshotTransferService$2.consume(SnapshotTransferService.java:359)
... 8 more
So there seems to be an issue with pushing the deltas and I don't see to know what's the issue is. To make it clearer every stream is pointing to a already created subvolume configured as @jutoft suggested in: https://github.com/ruediste/btrbck/issues/5#issuecomment-76807550 and these subvolumes are in another subvolume at /lxc (I'm just actually trying to backup a bunch of linux container virtual hosts each one having it's rootfs in a btrfs subvolume, such that these are my streams)
Also the destination in the remote server is a btrfs filesystem subvolume.