2022-04-25 10:02:43 +02:00
|
|
|
#!/usr/bin/python3
|
2013-05-23 10:19:43 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
# This file is part of TISBackup
|
|
|
|
#
|
|
|
|
# TISBackup is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# TISBackup is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with TISBackup. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
|
|
|
|
import datetime
|
2024-11-28 23:46:48 +01:00
|
|
|
import os
|
|
|
|
|
2022-04-25 10:02:43 +02:00
|
|
|
from .common import *
|
2013-05-23 10:19:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
class backup_null(backup_generic):
|
2024-11-29 00:54:09 +01:00
|
|
|
"""Null backup to register servers which don't need any backups
|
2013-05-23 10:19:43 +02:00
|
|
|
but we still want to know they are taken in account"""
|
2024-11-29 00:54:09 +01:00
|
|
|
|
2024-11-29 22:54:39 +01:00
|
|
|
type = "null"
|
|
|
|
|
|
|
|
required_params = ["type", "server_name", "backup_name"]
|
2013-05-23 10:19:43 +02:00
|
|
|
optional_params = []
|
|
|
|
|
2024-11-29 22:54:39 +01:00
|
|
|
def do_backup(self, stats):
|
2013-05-23 10:19:43 +02:00
|
|
|
pass
|
2024-11-29 22:54:39 +01:00
|
|
|
|
2013-05-23 10:19:43 +02:00
|
|
|
def process_backup(self):
|
|
|
|
pass
|
2024-11-29 22:54:39 +01:00
|
|
|
|
2013-05-23 10:19:43 +02:00
|
|
|
def cleanup_backup(self):
|
|
|
|
pass
|
2024-11-29 22:54:39 +01:00
|
|
|
|
2015-04-01 16:37:47 +02:00
|
|
|
def register_existingbackups(self):
|
|
|
|
pass
|
2024-11-29 22:54:39 +01:00
|
|
|
|
|
|
|
def export_latestbackup(self, destdir):
|
2013-05-23 10:19:43 +02:00
|
|
|
return {}
|
2024-11-29 22:54:39 +01:00
|
|
|
|
|
|
|
def checknagios(self, maxage_hours=30):
|
|
|
|
return (nagiosStateOk, "No backups needs to be performed")
|
|
|
|
|
2024-11-29 00:54:09 +01:00
|
|
|
|
2013-05-23 10:19:43 +02:00
|
|
|
register_driver(backup_null)
|
|
|
|
|
2024-11-29 22:54:39 +01:00
|
|
|
if __name__ == "__main__":
|
2013-05-23 10:19:43 +02:00
|
|
|
pass
|