Daily backup and checks


NAS

Recommended Posts

It occured to me that we should probably do some sort of simple cron based backup script for users. In this we would backup /config since it is so small and perhaps we could check the md5sums of key unRAID system files that shouldnt change.

 

Is there anything else that could be backed up.

 

I know this isnt rocket science but it doesn't exist and probably should and if we make it simple enough for all users it will help standardise it.

 

I was thinking a dated zip file to /backup/date.zip

 

thoughts?

 

Edit:

 

For 4.4 Beta 2 (edited out my own files)

 

root@TOWER:/boot# md5sum *

1045a8b5ce4bc64e6d1d75539f765c5b  bzimage

fe34c6e9d929aa1fa0917f692d522d85  bzroot

22314d85fa1d9f9ce8e6b5c478ed60ef  ldlinux.sys

b854d9a722dff13b03bb587ea2b53d46  license.txt

3998d21030cd7796aacda22aff2e2cf0  memtest

2f2d9efed40acbc7d6e2ebf255434758  menu.c32

2883039171a4cd80355b8b5f2baa14f2  readme.txt

e43bc853be1e29ee1628ebe916637c38  syslinux.cfg

 

Whachk these in a file then:

 

root@TOWER:/boot# md5sum -c checksum.md5

bzimage: OK

bzroot: OK

ldlinux.sys: OK

license.txt: OK

memtest: OK

menu.c32: OK

readme.txt: OK

syslinux.cfg: OK

 

Link to comment

I do a daily backup via rsync to /boot to /mnt/disk1/boot.

part of this reason is to allow me to boot from disk1 should the flash drive fail.

I plan to alter this to use the cache drive soon.

 

I had not thought of a dated/time period backup yet, but this is a great idea.

Should it be done on shutdown to preserve the superblock file just in case?

Link to comment

that makes alot of sense as well. The main thing i see is that there are alot if important files that are in themselves very small and perfect candidates for zipped backups.

 

Perhaps /boot/custom/backups would be more sensible destination in light of all the other projects going on.

 

As I said before its not rocket science but it would be advantageous if we all agree on the best way to do it and use the same script.

 

So this is probably better referred to as a config backup.

 

It would be almost small enough to encrypt, convert to text and post to pastebin :)

Link to comment

>> Perhaps /boot/custom/backups would be more sensible destination in light of all the other projects going on.

My only issue with putting the backup back on the flash is protection against the flash failing.

If it were on one of the disks, then another flash can be used to temporarily boot and restore it.

Link to comment

but we cant be sure that any disk exists. Easy enough to counter by adding some sanity checking.

 

Personally i like using the flash drive although i am absolutely aware of the implications of that. The cache drive seems like an excellent compromise and failing that use another disk.

 

Another thought why don't we backup syslog as well few things from /proc. This way you can say alot about how you box was configured and performing on a particular day.

Link to comment

Personally i like using the flash drive although i am absolutely aware of the implications of that. The cache drive seems like an excellent compromise and failing that use another disk.

It's easy enough to make this externally configurable.

 

 

Another thought why don't we backup syslog as well few things from /proc. This way you can say alot about how you box was configured and performing on a particular day.

 

My most recent mods to the rc.unRAID script backs up the syslog and some other diagnostic commands.

I added some hooks into the package install to also call this functionality when the log is rotated.

However, I discovered some issues with the standard logrotate definitions and I've been waiting for a response.

Link to comment

fyi my logrorate is the same as your e.g. broken

 

Would it be worth bundling all these daily backups together into one zip file rather than more than one process?. I dont think its unrealistic for these daily backups to be less than 200kB (depending on syslog explosions like duplicate files)

Link to comment

It's not unreasonable to bundle them, I'm not sure it's totally worth it.. I'll give it some thought.

 

I added the syslog archiving to rc.unRAID to allow capturing for trouble shooting on site and on the board.

 

I can add backup of the config directory, but I'm not totally in alignment with archiving the data to the same zip file.

Then again, others may feel it more appropriate because a diagnostic overview would contain the config files.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.