Main file for backup module
Imports
- Nfs
- Popup
- Progress
- Report
Includes
- backup/functions.ycp
- hwinfo/classnames.ycp
Global Functions
|
|
|
global GetCapacity (list<map<string,any> > media, symbol m) -> integer
|
|
Return capacity of required medium
- Parameters:
media |
Medium descriptions |
m |
Identification of required medium |
- Return value:
global get_search_script_parameters () -> string
|
|
Return backup_search.pl script parameters according to state of variables
- Return value:
|
String with command line parameters |
global PrepareBackup () -> boolean
|
|
Pre-backup function - mount NFS share if required
- Return value:
global PostBackup () -> boolean
|
|
Post-backup function - unmount mounted NFS share
- Return value:
global get_archive_script_parameters (string file_list, string file_comment) -> string
|
|
Return backup_search.pl script parameters according to state of variables
- Parameters:
file_list |
Where is list of files to backup stored |
file_comment |
Where is comment stored |
- Return value:
|
String with command line parameters |
global ExcludeNodevFS () -> void
|
|
Exclude file systems without device
global WriteProfile (list<string> volumes) -> map
|
|
Write autoinstallation profile to file autoinst.xml to the same directory as archive
- Parameters:
volumes |
list of created archives (it is written to the XML profile as restoration source) |
- Return value:
|
map $[ "result" : boolean (true on success), "profile" : string (profile file name) ] |
global ReadCronSetting (string filename) -> map
|
|
Parse cron file
- Parameters:
- Return value:
|
parsed values: $["auto":boolean, "day":integer, "hour":integer,
"minute":integer, "weekday":integer, "every":symbol] or empty map if
parse error occured |
global ReadCronSettings () -> void
|
|
Parse all /etc/cron.d/yast2-backup-* files and update profiles
global ReadBackupProfiles () -> boolean
|
|
Read backup profiles from file, do not set any global settings, just
- Return value:
|
true if there are some profiles available |
- See:
-
global CreateCronSetting (string profilename) -> string
|
|
Create cron file content for selected profile.
- Parameters:
profilename |
Name of the profile |
- Return value:
|
Cron content or empty string if profile has
disabled automatic start |
global WriteCronSettings () -> void
|
|
Write cron settings from profiles to /etc/cron.d/yast2-backup-* files
global WriteBackupProfiles () -> boolean
|
|
Write the backup profiles to a file - hardcoded /var/adm/YaST/backup/profiles.
- Return value:
|
true if the write operation was successful. |
global StoreSettingsToBackupProfile (string profile_name) -> void
|
|
Take the current profile information and store it into a given profile.
If the profile already exists, it will be overwritten.
- Parameters:
profile_name |
name of a profile to be stored into |
global RestoreSettingsFromBackupProfile (string profile_name) -> boolean
|
|
Restore the global settings from a given backup profile.
- Parameters:
profile_name |
name of a profile to be used |
- Return value:
|
If the name of the profile cannot be found, return false, otherwise return true. |
global RestoreDefaultSettings () -> void
|
|
Restore the default global settings.
global BackupProfileNames () -> list<string>
|
|
Get a sorted list of profile names currently available.
- Return value:
|
the list of strings (possibly empty). |
global CreateCronDescription (string profilename) -> string
|
|
Create description of automatic backup.
- Parameters:
profilename |
Name of the profile |
- Return value:
|
description string or empty string if profile has
disabled automatic start |
global BackupProfileDescriptions () -> list<term>
|
|
Helper function to extract the list of currently available profiles
- Return value:
|
List of item used in the table widget |
global RemoveBackupProfile (string profile_name, boolean remove_cronfile) -> boolean
|
|
Remove given profile.
- Parameters:
profile_name |
name of a profile to be removed |
remove_cronfile |
|
- Return value:
|
If the name of the profile cannot be found, return false, otherwise return true. |
global RemovableDevices (boolean only_writable) -> map
|
|
Try to detect all removable devices present in the system
- Parameters:
only_writable |
return only writable devices (e.g. exclude CD-ROMs) |
- Return value:
global ReadInstallablePackages () -> void
|
|
Read all packages available on the installation sources
global DetectedMountPoints () -> map
|
|
Returns detected mount points
- Return value:
global GetLocalArchiveName () -> string
|
|
Returns local archive name (required if NFS target is used)
- Return value:
global MapFilesToString () -> map
|
|
Returns string generated from selected files list. String is in format which
is accepted by backup_archive.pl script. Used global variables:
selected_files, backup_files.
- Return value:
|
map with keys "filelist" (string - list of files), "sel_files"
(integer - number of selected files), "sel_packages" (integer: number
of selected packages). |
- See:
-
global RemoveOldSingleArchives (string name, integer max) -> map
|
|
Remove and/or rename old existing single archives
- Parameters:
name |
Archive name |
max |
Maximum count of existing archives |
- Return value:
global RemoveOldMultiArchives (string name, integer max) -> map
|
|
Remove and/or rename old existing multivolume archives
- Parameters:
name |
Archive name |
max |
Maximum count of existing archives |
- Return value:
global RemoveOldArchives (string name, integer max, boolean multivolume) -> map
|
|
Remove and/or rename old existing archives
- Parameters:
name |
Archive name |
max |
Maximum count of existing archives |
multivolume |
Is archive archive multivolume? |
- Return value:
|