I have a zfs pool about 400GB which i need to backup remotely daily. I create daily snapshots locally and send them to the remote box with zxfer (zfs send over ssh)
i keep 3 weeks worth of daily snapshots
The problem is that block storage is not exactly cheap mostly about $0.05 to $0.1 / GB which will be $15-$40/mo just for storage.
Then i found frantech.ca that rents block storage with about $1.5/250GB. Nice. So I get a 1GB vm + 500GB storage for $6/mo.
(ordering something on frantech.ca is a pain the ass, always out of stock, use some scripting to notify you when available)
ok so i installed freebsd 12.2 or 12.3 which was the latest 12 branch (my source box is 12 so i thought to have the same codebase for zfs as the source)
attached the block storage, encrypted with geli, created a zfs pool
now sending the data from source was always failing with out of memory (well the destination box has only 1GB ram)
then I installed 13.x and it worked better, still sometimes zfs send was failing with out of memory.
It worked for months without problem then it would bomb daily, kind of painful.
I used a malloc bomb to try to memory pressure it and force it release some memory but without much success.
The wired memory grows to about 700-800M and the malloc bomb can decrease the usage to about 500M which is not always enough.
I do not mount the backup datasets, only the default zroot pool is mounted (i should had tried with UFS on root maybe)
retrying the send sometimes works, sometimes bombs
In the end i exported the block device (da0.eli) via iscsi (ctld) and using iscsi over a ssh tunnel
and attached it to a local box with enough memory
iscsi performance is crap (RTT from office to frantech is 25ms) but I don't really care if the backup takes 2minutes or one hour
so far it works.
other options are:
pay $3.5/mo more and get a VM with 2GB (this will probably work without trouble)
use the same 1GB VM but with UFS on root and hope will do better (too lazy to try for now)
move the iscsi initiator from office to another vm closer to frantech for a better RTT - i have a VM with enough ram which is 4ms from frantech
i have other backups too so if frantech vanishes over night im still ok
i keep 3 weeks worth of daily snapshots
The problem is that block storage is not exactly cheap mostly about $0.05 to $0.1 / GB which will be $15-$40/mo just for storage.
Then i found frantech.ca that rents block storage with about $1.5/250GB. Nice. So I get a 1GB vm + 500GB storage for $6/mo.
(ordering something on frantech.ca is a pain the ass, always out of stock, use some scripting to notify you when available)
ok so i installed freebsd 12.2 or 12.3 which was the latest 12 branch (my source box is 12 so i thought to have the same codebase for zfs as the source)
attached the block storage, encrypted with geli, created a zfs pool
now sending the data from source was always failing with out of memory (well the destination box has only 1GB ram)
then I installed 13.x and it worked better, still sometimes zfs send was failing with out of memory.
It worked for months without problem then it would bomb daily, kind of painful.
I used a malloc bomb to try to memory pressure it and force it release some memory but without much success.
The wired memory grows to about 700-800M and the malloc bomb can decrease the usage to about 500M which is not always enough.
I do not mount the backup datasets, only the default zroot pool is mounted (i should had tried with UFS on root maybe)
retrying the send sometimes works, sometimes bombs
In the end i exported the block device (da0.eli) via iscsi (ctld) and using iscsi over a ssh tunnel
and attached it to a local box with enough memory
iscsi performance is crap (RTT from office to frantech is 25ms) but I don't really care if the backup takes 2minutes or one hour
so far it works.
other options are:
pay $3.5/mo more and get a VM with 2GB (this will probably work without trouble)
use the same 1GB VM but with UFS on root and hope will do better (too lazy to try for now)
move the iscsi initiator from office to another vm closer to frantech for a better RTT - i have a VM with enough ram which is 4ms from frantech
i have other backups too so if frantech vanishes over night im still ok