Upload OSB Button/Function

Have a great idea for an upcoming release of NEMS? Post it here.
Post Reply
haaku
Junior Member
Posts: 7
Joined: Sat Oct 20, 2018 5:26 am

Upload OSB Button/Function

Post by haaku »

The problem:

You changed a bit here and there, tweaked that, optimizedt this saved it and it worked. Yay! You changed a third or fourth thing aaaaand... It's gone. Migrating the OSB and everthing which was changed before and worked is also gone. Damn!

The solution:

A button in the "Migrator" tab which allows the user to manually upload the OSB. Maybe even a command like:

Code: Select all

sudo nems-store osb

or just

Code: Select all

sudo nems-upload osb

That would be great! This way you don't have to roll back to an "old" version without loosing the newest but working changes.

Cheers!
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: Upload OSB Button/Function

Post by Robbie Ferguson »

Haha - at first I thought your first paragraph was saying that I (the developer) had made some great changes that worked, but then broken them, and I gasped! LOL

Now I get what you're saying: You (the user) have your config all good one day, but then break it... but then to restore OSB (off site backup) means reverting to the previous day - losing the great work you'd done.

The solution you desire is already there, just falls amongst the "no user serviceable parts inside" category.

Here you are:

Code: Select all

sudo /root/nems/nems-migrator/offsite-backup.sh
That'll trigger an off site backup, on demand. If you already have a backup for that day, this will replace it (OSB allows one backup to be stored per day).

The process does not output anything to the terminal. To see if it worked, you can tail the log file after running it:

Code: Select all

sudo tail -n 1 /var/log/nems/nems-osb.log
You can learn about the log format in the docs here: https://docs.nemslinux.com/features/nem ... or#backup1

Remember: Because your "normal" off site backup is scheduled to run at 11:30pm, the backup you create will be overwritten at that time. You may be wise to instead download a local backup from NEMS Migrator as a failsafe, which is created every 6 hours, and can also be manually created if desired with the following command:

Code: Select all

sudo rm /var/www/html/backup/snapshot/backup.nems && sudo /root/nems/nems-migrator/backup.sh
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
haaku
Junior Member
Posts: 7
Joined: Sat Oct 20, 2018 5:26 am

RE: Upload OSB Button/Function

Post by haaku »

Hey Rob!

Thanks for the clarification. I didn't knew there is already a function like that. But maybe you can still implement a button which calls that function? Maybe there are users who doesn't know it either.

A local backup is a solution as well but I love the OSB and want to make use of it as often as possible.  :D

Ps: yes, the "you" was in fact for "the user" . Don't worry!
Post Reply