-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #672 from NebraLtd/backup_updates
Add wingbits to backup
- Loading branch information
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
import shutil | ||
|
||
from hw_diag.utilities.backup.base import BaseBackupRestore | ||
|
||
|
||
CONFIG_FILE = '/var/nebra/wingbits.json' | ||
|
||
|
||
class WingbitsBackupRestore(BaseBackupRestore): | ||
name = 'WINGBITS' | ||
|
||
def backup(self): | ||
os.mkdir(self.tmpdir) | ||
shutil.copyfile(CONFIG_FILE, '%s/wingbits.json' % self.tmpdir) | ||
|
||
def restore(self): | ||
os.system('cp %s/wingbits.json %s' % (self.tmpdir, CONFIG_FILE)) # nosec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters