TrueNAS Backup Server only running on-demand

thomas-hn

Explorer
Joined
Aug 2, 2020
Messages
82
Hello,

for storing backups on a separate server I would like to only poweron the backup server once a week (to save the too expensive electricity in Germany).
As the server will not be up and running all the time in this scenario, the scrubs will not be possible everytime. Therefore, would it be possible to configure/script TrueNAS in a way, that it executes the following steps?
  1. Check on startup if a scrub is overdue and run the scrub if required.
  2. After finishing the scrub pull the backup data from the main server.
  3. If the backup is completed, shutdown the system.
Could this simply be done with TrueNAS? Are there any other drawbacks in this case, e.g. with other periodic tasks, SMART, etc.?

Thanks a lot in advance,

Thomas
 

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
Hello,

for storing backups on a separate server I would like to only poweron the backup server once a week (to save the too expensive electricity in Germany).
As the server will not be up and running all the time in this scenario, the scrubs will not be possible everytime. Therefore, would it be possible to configure/script TrueNAS in a way, that it executes the following steps?
  1. Check on startup if a scrub is overdue and run the scrub if required.
  2. After finishing the scrub pull the backup data from the main server.
  3. If the backup is completed, shutdown the system.
Could this simply be done with TrueNAS? Are there any other drawbacks in this case, e.g. with other periodic tasks, SMART, etc.?

Thanks a lot in advance,

Thomas
Not an expert in this use case but suggest looking into the following. I think a cron job can do this but would be complicated.

1. Consider doing the backup before the scrub as you don't want both at the same time & this let's you better predict the bu start time for the main to manage any impact to it with other workload.

2. The backup likely should use rsync, depending on server OS. In my use case, I use Windows built-in backup util to store on a local drive then batch copy the bu dir to the server with a scheduled task. This lets me a) manage the bu from the server & b) have it create a log file of the results. But rsync is more powerful.

3. The default TrueNAS cron job gui will easily create a cron job to shut the system down at a certain time, if the bu & scrub task duration is well known.

4. Someone will need to check status - the real test of a backup is restoration.

Hope this helps.
John
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
for storing backups on a separate server I would like to only poweron the backup server once a week

Then what the point of having a server or even truenas? just get external storage device (USB/thunderbolt...) or even cloud storage?
 

thomas-hn

Explorer
Joined
Aug 2, 2020
Messages
82
Then what the point of having a server or even truenas? just get external storage device (USB/thunderbolt...) or even cloud storage?
It is simply about having a backup ZFS pool to which I can simply replicate. Most external storage (USB, etc.) ist not recommended for ZFS pools and I also do not want to have the drives to lie around. So having a backup server is the best option for me, but not having it running 24/7.
 

Electr0

Dabbler
Joined
Dec 18, 2020
Messages
47
@thomas-hn I'm trying to do the same thing in my thead. Maybe have a look there and we can help each other out?
(I'm also in Germany )
 
Top