2002-01-03 18:46:48 +03:00
/*
* Copyright ( C ) 2001 Sistina Software ( UK ) Limited .
*
* This file is released under the GPL .
*/
# ifndef _LVM_TOOL_ARCHIVE_H
# define _LVM_TOOL_ARCHIVE_H
2002-01-07 14:12:11 +03:00
# include "metadata.h"
2002-01-03 18:46:48 +03:00
/*
2002-02-11 14:43:17 +03:00
* FIXME : This file is going to merge with the archiving code in
* lib / format_text at some point .
*/
/*
* There are two operations that come under the general area of
* backups . ' Archiving ' occurs just before a volume group
* configuration is changed . The user may configure when
* archived files are expired . Typically archives will be stored
* in / etc / lvm / archive .
2002-01-03 18:46:48 +03:00
*
2002-02-11 14:43:17 +03:00
* A ' backup ' is a redundant copy of the * current * volume group
* configuration . As such it should be taken just after the
* volume group is changed . Only 1 backup file will exist .
* Typically backups will be stored in / etc / lvm / backups .
2002-01-03 18:46:48 +03:00
*/
int archive_init ( const char * dir ,
unsigned int keep_days , unsigned int keep_min ) ;
void archive_exit ( void ) ;
2002-01-07 12:05:31 +03:00
void archive_enable ( int flag ) ;
2002-01-03 18:46:48 +03:00
int archive ( struct volume_group * vg ) ;
2002-02-11 23:50:53 +03:00
int archive_display ( struct cmd_context * cmd , const char * vg_name ) ;
2002-01-03 18:46:48 +03:00
int backup_init ( const char * dir ) ;
void backup_exit ( void ) ;
2002-01-07 14:12:11 +03:00
void backup_enable ( int flag ) ;
2002-01-03 18:46:48 +03:00
int backup ( struct volume_group * vg ) ;
2002-01-09 22:16:48 +03:00
int backup_remove ( const char * vg_name ) ;
2002-01-03 18:46:48 +03:00
2002-11-18 17:04:08 +03:00
struct volume_group * backup_read_vg ( struct cmd_context * cmd ,
const char * vg_name , const char * file ) ;
int backup_restore_vg ( struct cmd_context * cmd , struct volume_group * vg ) ;
2002-02-12 00:00:35 +03:00
int backup_restore_from_file ( struct cmd_context * cmd , const char * vg_name ,
const char * file ) ;
2002-02-11 23:50:53 +03:00
int backup_restore ( struct cmd_context * cmd , const char * vg_name ) ;
2002-01-10 17:27:47 +03:00
2002-11-18 17:04:08 +03:00
int backup_to_file ( const char * file , const char * desc , struct volume_group * vg ) ;
2002-01-03 18:46:48 +03:00
# endif