![]() ![]() I opted for the Option 3) – triggering a send/receive-script using devd-rules. – no (additional) snapshots for replication are needed – target is ext4, can be easily read on every Linux-Box Option 4) Use rsync to “copy” data to External HDD (et4) – Housekeeping, Sanity-Checks, Logfile and Email-Notification This results in the error message “cannot receive incremental stream: destination has been modified.” ( ) – atime (accessing files in the backup) also changes target. Kudos to the creator of this great script. – Replicate Snapshot using “send/receive” – Create a SMB-Share for the root dataset, readonly.ġ) Trigger a script, when externalHDD is attached – in the setting of the root DataSet set “Enable Atime” to off. Prerequisite is to create a Pool in TrueNas. Option 3) Trigger local replication through script – can’t trigger this automatically, when disc is connected. – Don’t use encryption, as it is only for the “transport” (“encrypting the data before transfer and decrypting it on the destination system”).ġ) Create a Backup-Pool (with encryption) and an unencrypted dataset (Data) below it, which will be the target for the backup.Ģ) Create a “periodic snapshot task” for the whole dataset/pool (weekly)ģ) Create a replication task, based on this snapshot (set read only):Ĥ) Change encryption options for the root-dataset (Pool) and provide the same key as for the “original” dataset.ĥ) To unkock a replicated, encrypted dataset, uncheck the option “Unlock with key file” and provide the “dataset key” (dataset_Data_key.txt) instead (both for parent and child dataset, use the same keyfile, when properties had been inherited).Ħ) Create a NFS-Mountpoint (read only) for the Backup-Dataset. ![]() So for Backups another option is “local replication”: #Freenas usb backup install#Option 2) TrueNAS: Local replicationĪs TrueNas is an “appliance” it’s not recommended and quiet difficult to install software outside of jails. – TrueNas is an “appliance” it’s not recommended and quiet difficult to install software outside of jails. Sanoid/Syncoid is a wrapper for ZFS send/receive to make the handling easier. 3) Run script automatically when HD is attached You cannot send the whole encrypted pool (to be more precicse the root-Dataset), instead you need to send each encrypted dataset separately. Using this option might be necessary when the file system is modified after a rollback occurs but before the receive is initiated.” ( ). The Option -F to “zfs receive” will “force a rollback of the file system to the most recent snapshot before the receive is initiated. The Option -R copies all child-dataset as well. Using the Option -P copies all settings (including mount points.) of the dataset. Zfs snapshot send -v -i | zfs receive backup-pool/dataset So to work two snapshots are needed (one, which represents the initial state, and a secnd one, chich represents the current state of the data) (see ). This only works, if the initial snapshot is already present at the receiving side. Szfs send this way only transfers the differences between two snapshots. Zfs send -v | zfs receive backup-pool/dataset c) Subsequent incremental backups are sent via Flag -i. A dataset can only be replicated to an empty target-dataset. Instead of creating an archive-file, the output is written directly to the backup-pool. Zfs snapshot b) Send the snapshot as a datastreamĪnd pipe the output to the receiving dataset in the backup-pool. So the tasks are: a) Create a snapshot of a dataset This has to be done on dataset-level, as it is not possible to send an ecnrypted pool as a whole. This snapshot is then sent to the Backup-Pool. ![]() However, as data within the active dataset changes, the snapshot consumes disk space by continuing to reference the old data, thus preventing the disk space from being freed.” ( ).Ī snapshot is used to create a consistent state of the data. Snapshots can be created almost instantly, and they initially consume no additional disk space within the pool. 2) Use replication to transfer files to Backup-Poolĭefinition: “A snapshot is a read-only copy of a file system or volume. There should be no partition present on the disk. Zpool create = Creates a new “simple, non redundant storage pool on a single device” ( /doc/). Zpool create -f -o ashift=12 -O compression=lz4 -O mountpoint=none \ Mount -t ext2fs /dev/da3s1 /media/usb-stick In TheoryĮxplained in: 1) Create a pool on the disc Should i use ZFS on a single (backup)-disk? see: this thread in the truenas forum –> I’m not sure yet, so let’s have a closer look…. Options 1-3 expect ZFS on the target volume, option 4 works with any filesystem. In practice, there are different options: In theory there is one solution to backup a TrueNas Data-Share to an external hard disc: Fiddle with send/receive (see below) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |