<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div>On Sat, 2024-12-21 at 22:40 +0000, Bernd Lentes wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div><br></div><div>Hi Smoot,</div><div><br></div><div>when and how did you create the subvolumes ?</div><div>Have they been already available during installation of Ubuntu ?</div></blockquote><div><br></div><div> The backup instances are snapshots which are subvolumes. After I backup my servers to the backup filesystem, I run this script:</div><div><br></div><div><font face="Courier New, Courier, monospace">BACKUPDIR=/backup</font></div><div><font face="Courier New, Courier, monospace">date=`date +%Y-%m-%d`</font></div><div><font face="Courier New, Courier, monospace">year=`date +%Y`</font></div><div><font face="Courier New, Courier, monospace">[ -d $BACKUPDIR/.snapshots/$year ] || mkdir $BACKUPDIR/.snapshots/$year</font></div><div><font face="Courier New, Courier, monospace">btrfs subvolume snapshot -r $BACKUPDIR $BACKUPDIR/.snapshots/$year/$date</font></div><div><font face="Courier New, Courier, monospace"><br></font></div><div>The btrfs command effectively make a snapshot of the entire filesystem which is mounted on /backup</div><div><br></div><div>I do a few other housekeeping chores to delete old snapshots, but the above is where the snapshot volumes are created. I do this daily, out of cron which is why the snapshots are named the way they are. ".snapshot" is just a convenient name and can be anything.</div><div><br></div><div>Please keep in mind because of BTRF's copy on write, each snapshot only reflects the differences from the previous snapshot. As a result each snapshot is not a true backup, but is reliable enough for my purposes.</div><div><br></div><div><span><pre>-- <br></pre><pre>Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot@tic.com
</pre></span></div></body></html>