Jump to content

Server Config Backup oddities


techywarrior

Recommended Posts

techywarrior

Ebr, I had to use the backup plugin because for whatever reason (something related to GB but still having trouble finding exactly what) I couldn't upgrade on unRAID. Anyway, the plugin saved me a ton of time but I noticed a few things and I'm not sure if they are intentional or bugs.

 

  • On restore my library structure was retained (I understand why the paths aren't) but everything was set to Mixed Movies & TV. And since you have to delete the library to change the type it made it sort of useless to have it in the restore (shouldn't it retain the type on backup/restore?)
  • Any chance to keep custom images, at least for users and/or top level views? (basically the stuff not in media folders.)
  • Can it backup plugin settings? Things like Genre Cleaner and Studio Cleaner are such a pain in the ass to redo

 

Link to comment
Share on other sites

1 - is an oversight that simply has never been caught til now. @@Luke - where is the type of media folder stored?

 

2 - maybe at some point in the future.

 

3 - this should already be happening.

Link to comment
Share on other sites

techywarrior

1. Ok, glad I found a bug to fix :)

 

3. hm, maybe it was the order I did things then. I restored before installing the plugins. But I sort of assumed that the plugin wouldn't overwrite the restored settings files.

Link to comment
Share on other sites

techywarrior

Is the restore log in the /logs/ folder? I don't see anything specifically listed as a restore log. I'm going to go thru the server logs in the folder and see if one mentions restoring.

 

lol, nevermind. No, no restore log :(

I guess this is another bug (could be only unRAID or Linux in general)

2014-11-23 11:21:29.1494 Error - Server Configuration Backup: Unable to werite to backup logger /mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log
	Access to the path "/mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log" is denied.
	System.UnauthorizedAccessException
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
	  at System.IO.File.AppendAllText (System.String path, System.String contents) [0x00000] in <filename unknown>:0 
	  at MBBackup.Logging.BackupLogger.LogLine (System.String line, System.Object[] paramList) [0x00000] in <filename unknown>:0 
	
2014-11-23 11:21:29.1520 Error - Server Configuration Backup: Unable to werite to backup logger /mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log
	Access to the path "/mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log" is denied.
	System.UnauthorizedAccessException
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
	  at System.IO.File.AppendAllText (System.String path, System.String contents) [0x00000] in <filename unknown>:0 
	  at MBBackup.Logging.BackupLogger.LogLine (System.String line, System.Object[] paramList) [0x00000] in <filename unknown>:0 
	
2014-11-23 11:21:29.1520 Error - Server Configuration Backup: Unable to werite to backup logger /mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log
	Access to the path "/mnt/appdisk/backups/MB Backup - 2014-11-21 04.50.29/Restore.log" is denied.
	System.UnauthorizedAccessException
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
	  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
	  at System.IO.File.AppendAllText (System.String path, System.String contents) [0x00000] in <filename unknown>:0 
	  at MBBackup.Logging.BackupLogger.LogLine (System.String line, System.Object[] paramList) [0x00000] in <filename unknown>:0 

It goes on a long time like that trying to write to the non-existing log file.

Edited by techywarrior
Link to comment
Share on other sites

You need to make sure it has full write permissions to the backup folders although I don't really see how it could be making backups without it...

 

As you see there, the backup and restore logs are in the backup folders themselves because they are different for every backup.

Link to comment
Share on other sites

techywarrior

Yea, I wrote the first two sentences and then edited the post when I found the error in the system log.

 

Ok, I tried to create another backup and I think I know what the issue was. Phaze and I were trying different things to figure out why the upgrade was failing and it looks like I created the backup as root and then the restore was run as a lower permission user so it couldn't write to the backups folder. I think it would be a good idea for the restore log to be in the main MB logs folder though.

Link to comment
Share on other sites

I think it would be a good idea for the restore log to be in the main MB logs folder though.

 

Both the backup and restore logs are directly related to the specific backups they belong to.  It is much easier to find the proper log for a backup or restore operation with it actually beside the backed up files.  It also means they persist beyond just the last operation you performed.

Link to comment
Share on other sites

techywarrior

Both the backup and restore logs are directly related to the specific backups they belong to.  It is much easier to find the proper log for a backup or restore operation with it actually beside the backed up files.  It also means they persist beyond just the last operation you performed.

Ok, even if you named the log Restore-{backup name} then it could still overwrite if you restored from the backup twice, so that sort of makes sense. Of course you could do Restore-{backup name}-{timestamp}.log

 

Also, maybe as a failsafe, if you don't want to change the default log location, if you get back that unable to write error maybe just create a restore.log file in the default logs folder?

 

I doubt that this would be a frequent issue but I could see it happening if people migrated from different Linux installs but used a shared backup location.

Link to comment
Share on other sites

It is an absolute requirement for the backup plug-in to have full access to the directory where it creates backups.  The log is the least of our problems in that case.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...