btrfs send non-root
I'm getting an error when trying to send a subvolume. I only seem to be able to do this as root. The subvolume was created by the user account, and not root. Could anybody shed some light on why this is failing? Is there a way to get it working? $ btrfs send /var/spool/backups/hacking/2017-03-10 > something ERROR: cannot open '/': Operation not permitted Also appears I cannot even use btrfs subvolume show: $ btrfs subvolume show /var/spool/backups/hacking/2017-03-10 ERROR: can't perform the search - Operation not permitted ERROR: can't find 'var/spool/backups/hacking/2017-03-10' $ sudo btrfs subvolume show /var/spool/backups/hacking/2017-03-10 /var/spool/backups/hacking/2017-03-10 Name: 2017-03-10 UUID: c3a92646-bd6b-7a4f-ae10- 8bd12e569772 Parent UUID: 38b66de9-84d3-4848-ae53- 9a2fe861618c Received UUID: - Creation time: 2017-03-10 19:11:22 + Subvolume ID: 564 Generation: 753377 Gen at creation: 753377 Parent ID: 257 Top level ID: 257 Flags: readonly Snapshot(s): $ uname -a Linux sam-laptop 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ btrfs --version btrfs-progs v4.4 signature.asc Description: This is a digitally signed message part
Re: Questions on incremental backups
Thanks everyone for the responses. I'll start setting up my backup strategy in 2 or 3 weeks. I'll give the diff and unionFS tips a go, and report back on any progress. signature.asc Description: This is a digitally signed message part
Re: Questions on incremental backups
Thanks for the replies, I think that's most of the questions answered. I'll not bother backing up any VMs, as they won't contain anything worth backing up. Can anybody answer the last couple of remaining questions? On ven, 2014-07-18 at 14:35 +1000, Russell Coker wrote: Ignoring directories in send/recv is done by subvol. Even if you use rsync it's a good idea to have different subvols for directory trees with different backup requirements. So, an inner subvol won't be backed up? If I wanted a full backup, I would presumably get snapshots of each subvol separately, right? Displaying backups is an issue of backup software. It is above the level that BTRFS development touches. While people here can probably offer generic advice on backup software it's not the topic of the list. As said, I don't mind developing the software. But, is the required information easily available? Is there a way to get a diff, something like a list of changed/added/removed files between snapshots? If I want to create a backup view, I could start with just a file view of the most recent snapshot, but is there a way I can quickly get a list of additional files in the other snapshots that are not present in the most recent one (files that have been deleted)? And, finally, nobody has mentioned on the possibility of merging multiple snapshots into a single snapshot. Would this be possible, to create a snapshot that contains the most recent version of each file present across all of the snapshots (including files which may be present in only one of the snapshots)? signature.asc Description: This is a digitally signed message part
Questions on incremental backups
I've a couple of questions on incremental backups. I've read the wiki page, and would like to confirm my understanding of some features, and also see if other features are possible that are not mentioned. I'm looking to replace my existing backup solution, and hoping to match the features I currently use, and go a little beyond. === Daily snapshot === So, if I understand correctly, I can make a daily snapshot of my filesystem with very little overhead. Then these can later be synced efficiently to another system (only syncing the differences), so I can backup regularly over the internet to my server, and also to an external HDD. After syncing, I can delete the snapshots (other than the trailing one needed for the next backup). In this way I can keep a constant stream of daily backups even when offline, and simply sync them next time I am online before deleting them locally. === Ignore directories === Due to storage limitations on my server, is it possible to ignore certain directories? For example, ignoring the folder that stores all my games, as this could be rather large, and the contents can easily be re-downloaded. The instructions involve subvolumes, so maybe it's possible to ignore a subvolume when syncing? If that is possible, then is it also possible to have a separate backup that does include the ignored directory? For example, having the smaller sync to the storage-limited server, but having a full sync to an external HDD. === Display backups === Is it possible to view the contents of all backups? So, the expected interface would be something like a tree of all files from across all snapshots. Any files that are not present in the latest snapshot would be greyed out to show they have been deleted. Selecting a file would show a list of versions of the file, with one version for each snapshot the file has been modified in. As long as I can get access to this information, maybe some kind of diff between snapshots, I'm willing to write the actual software to display this interface. (I suppose even if it's not supported, I could crawl through the filesystems and generate some kind of database, but that sounds like a painful process.) === Merge snapshots down === Is there some way to merge snapshots down? So, I could merge the last week of daily snapshots into a single weekly snapshot. The new snapshot should include all files across all the snapshots (even if deleted in some of the snapshots), and include just the latest version of each file. This way, I'd like to maintain daily snapshots, which can be regularly merged down into weekly snapshots, and then into monthly snapshots, and then finally into yearly snapshots. And, finally, there's no problem in deleting old snapshots? I'm assuming any data from these snapshots used by other snapshots will still be referenced by the other snapshots, and thus be retained, so nothing will break? signature.asc Description: This is a digitally signed message part
btrfs send/receive test failing
I'm trying out the btrfs send|receive command as shown on the incremental backup wiki page, but the command is failing. I've tried it with sudo as it had not permitted errors, but still no luck. The output is: s@s-Air:~$ btrfs send /home/BACKUP | btrfs receive /media/s/99b1c51d-b3bb-4179-a621-9d5a27acc385/Air ERROR: failed to determine mount point for /home/BACKUP ERROR: failed to open destination directory /media/s/99b1c51d-b3bb-4179-a621-9d5a27acc385/Air. Operation not permitted s@s-Air:~$ sudo btrfs send /home/BACKUP | btrfs receive /media/s/99b1c51d-b3bb-4179-a621-9d5a27acc385/Air ERROR: failed to open destination directory /media/s/99b1c51d-b3bb-4179-a621-9d5a27acc385/Air. Operation not permitted [sudo] password for s: At subvol /home/BACKUP ERROR: open @home/BACKUP failed. No such file or directory s@s-Air:~$ sudo btrfs send /home/BACKUP | sudo btrfs receive /media/s/99b1c51d-b3bb-4179-a621-9d5a27acc385/Air At subvol /home/BACKUP ERROR: open @home/BACKUP failed. No such file or directory signature.asc Description: This is a digitally signed message part