Home
Name Modified Size InfoDownloads / Week
btrfsManage 2021-05-31 96.1 kB
readme.txt 2021-05-31 7.0 kB
Totals: 2 Items   103.1 kB 0
Version:     0.2.7 31/05/2021

Usage: btrfsManage [OPTION:...,...] ' actionType ' ... 

btrfsManage [OPTION:nomake] SCRUB [root@exnet.gdb.it:]/dev/sda1 
btrfsManage [OPTION:autoopt[,nomake]] SNAPSHOT /|/dev/sdb1:root 
btrfsManage [OPTION:autoopt[,nomake]] SEND /|/dev/sdb1:root [root@exnet.gdb.it:]/dev/sda3 [pc1] 
btrfsManage [OPTION:tosnap] ALLSNAPLIST [root@exnet.gdb.it:]/dev/sda3 [root/root-2019-11-.*] 
btrfsManage [OPTION:tosnap] NAMESNAPLIST [root@exnet.gdb.it:]/dev/sda3 [root/root-2019-11-.*] 
btrfsManage [OPTION:tosnap] LASTSNAPLIST [root@exnet.gdb.it:]/dev/sda3 [root/root-2019-11-.*] 
btrfsManage [OPTION:tosnap] SNAPLIST [root@exnet.gdb.it:]/dev/sda3 [root/root-2019-11-.*] 
btrfsManage [OPTION:autoopt[,tosnap][,nomake]] SNAPDEL [root@exnet.gdb.it:]/dev/sda3 root/root-2019-11-.* [exclude subvolume] 
btrfsManage [OPTION:tosnap] SNAPMOUNT [root@exnet.gdb.it:]/dev/sda3 [root/root-2019-11-01-14-52-01.18] 
btrfsManage [OPTION:torec] SNAPSEND /|/dev/sda2 [[pc1/]root/]root-2019-11-01-14-52-01.18 [root@exnet.gdb.it:]/dev/sda3 [dst]


SCRUB		Run the scrub of the the device ' /dev/sda1 '. 
SNAPSHOT	In ' btrfssnapshot ' subvolume are inserted the snapshot subvolume  
		of the mounting point ' / '. 
SEND		In ' btrfsreceive[/pc1]' subvolume of  
		the device ' /dev/sda3 ' are written the snapshots sent by the  
		' btrfssnapshot ' subvolume of the mounting point ' / '. 
...SNAPLIST	View the snapshots in the device ' /dev/sda3 '. 
SNAPDEL		Delete the snapshots with name ' btrfsreceive/root/root-2019-11-.* ' in  
		the device ' /dev/sda3 '. 
SNAPMOUNT	Mount the snapshot with name ' btrfsreceive/root/root-2019-11-01-14-52-01.18 ' in  
		the device ' /dev/sda3 ' and wait for closing mount shell. 
SNAPSEND	In ' btrfsreceive/[dst/][pc1/]root ' subvolume of the device ' /dev/sda3 ' 
		are written the snapshot sent by the ' btrfssnapshot/[pc1/]root/root-2019-11-01-14-52-01.18 ' 
		subvolume of the mounting point ' / ' or device ' /dev/sda2 '.


OPTION:		Optional, must be firts parameter. 

		For display the snapshots list: 				list . 
		For display the use of the filesystem: 				usage . 
		For delete old snapshots: 					olddel . 
		For auto delete old snapshots if no space left on device: 	autodel . 
		For send only last snapshots: 					lastsnap . 
		For snapshot list with default usage: 				autoopt . 
		For snapshot with default usage,list,autodel: 			autoopt . 
		For send with default usage,list,lastsnap,autodel: 		autoopt . 
		For delete with default usage,olddel: 				autoopt . 
		For run action on ' btrfssnapshot ' subvolume: 			tosnap . 
		(default is ' btrfsreceive ') 
		For run SNAPSEND on ' btrfsreceive ' subvolume: 		torec . 
		(default is ' btrfssnapshot ') 
		For display command messages: 					cmdmsg . 
		For run without scrub/snapshot/send/delete action perform: 	nomake . 
		For run without sync subvolume/filesystem: 			nosync .

EMULATE:	Optional, must be firts parameter (before OPTION: parameter). 

		For run with command emulate : 					on . 
		For run with verbose command emulate : 				all . 

		Emulated devices: 
		/dev/sdb1 on / , /dev/sdb3 on /mnt/data_storage and /mnt/data_backup 
		/dev/sda1-3 for snapshot receive


Not need install, just copy in to ' /usr/local/bin ' or other.

The subvolume on which to perform the snapshot is detected by the subvolume  
currently mounted. 
The subvolume necessary to btrfsManage are created and mounted automatically.


For remote manage, configure ssh to launch remote btrfsManage without password. 
For safety reasons you can set ssh to launch only btrfsManage without password.


This actionType are directly used by btrfsManage.

btrfsManage RECEIVE /dev/sda3 ' btrfsreceive/[pc1/]root ' ' root-2019-11-01-14-52-01.18 ' 
btrfsManage SNAPUMOUNT [root@exnet.gdb.it:]/tmp/tmp.ULyLSikNnk [192.168.0.200:34064] 
btrfsManage ACTIONEND /dev/sda3 root


This options are directly used by btrfsManage. 

	For display the data with data separator: 			sepdata . 
	For display the command messages with remote separator: 	seprem . 
	For use the action in other programs: 				useprog . 
	For not perform operations after the end of the actions: 	noend . 
	For list subvolume using full path of parent subvolume: 	fullpath . 
	For debug/log in ' /tmp/btrfsManageDebug.txt ': 		parSet exeCmd getListSubVol . 
	For btrfs stress: 						CHECK SINGLE .


Example 

/usr/local/bin/btrfsManage OPTION:autoopt SNAPSHOT / 
 
(2019-05-25 17:36:34) Start btrfsManage 
. . . Start managing SNAPSHOT ' / ' filesystem on ' /dev/nvme0n1p2 ' device 
. . . from ' /root ' subvolume in ' /tmp/tmp.rCElovOKqL ' filesystem 
. . . to ' btrfssnapshot/root ' subvolume in ' /tmp/tmp.rCElovOKqL ' filesystem 
 
Latest snapshot is ' root-2019-05-19_18:39:01.423 ' in ' root 'subvolume 
. . . with date ' 2019-05-19_18:39:01 ' and number ' 423 ' 
 
Creation ' root-2019-05-25_17:36:34.part ' snapshot into ' root ' subvolume 
Rename ' root-2019-05-25_17:36:34.part ' into ' root-2019-05-25_17:36:34.424 ' snapshot 
 
Snapshot list in ' root ' subvolume 
. . . btrfssnapshot/root/root-2018-08-22_16:12:01.320 
. . . btrfssnapshot/root/root-2019-03-24_19:50:02.403 
. . . btrfssnapshot/root/root-2019-03-30_12:49:01.404 
. . . btrfssnapshot/root/root-2019-03-30_15:20:01.405 
. . . : - - - - - - - - - : 
. . . btrfssnapshot/root/root-2019-05-18_14:24:51.421 
. . . btrfssnapshot/root/root-2019-05-18_15:20:01.422 
. . . btrfssnapshot/root/root-2019-05-19_18:39:01.423 
. . . btrfssnapshot/root/root-2019-05-25_17:36:34.424 
 
Filesystem usage in ' /dev/nvme0n1p2 ' device 
. . . Device size: 237.99GiB 
. . . Free (estimated): 32.94GiB (min: 32.94GiB) 
 
(2019-05-25 17:36:34) End btrfsManage 
. . . End managing SNAPSHOT ' / ' filesystem on ' /dev/nvme0n1p2 ' device 
CORRECTLY

 
/usr/local/bin/btrfsManage OPTION:autoopt SEND / /dev/sda3 
 
(2019-05-25 19:08:44) Start btrfsManage 
. . . Start managing SEND ' / ' filesystem ' root ' snapshot to ' /dev/sda3 ' device 
. . . from ' btrfssnapshot/root ' subvolume in ' /tmp/tmp.zar3GsqVek ' filesystem 
. . . to ' btrfsreceive/root ' subvolume in ' /tmp/tmp.njoEGALZYs ' filesystem 
 
Send ' root-2019-05-25_17:36:34.424 ' snapshot to ' root/.part ' subvolume 
Move ' root-2019-05-25_17:36:34.424 ' snapshot to ' root ' subvolume 
 
Snapshot list in ' root ' subvolume 
. . . btrfsreceive/root/root-2018-08-22_16:12:01.320 
. . . btrfsreceive/root/root-2019-03-24_19:50:02.403 
. . . btrfsreceive/root/root-2019-03-30_12:49:01.404 
. . . btrfsreceive/root/root-2019-03-30_15:20:01.405 
. . . : - - - - - - - - - : 
. . . btrfsreceive/root/root-2019-05-18_14:24:51.421 
. . . btrfsreceive/root/root-2019-05-18_15:20:01.422 
. . . btrfsreceive/root/root-2019-05-19_18:39:01.423 
. . . btrfsreceive/root/root-2019-05-25_17:36:34.424 
 
Filesystem usage in ' /dev/sda3 ' device 
. . . Device size: 830.44GiB 
. . . Free (estimated): 323.83GiB (min: 267.12GiB) 
 
(2019-05-25 19:11:41) End btrfsManage 
. . . End managing SEND ' / ' filesystem ' root ' snapshot to ' /dev/sda3 ' device 
CORRECTLY
USAGE
Source: readme.txt, updated 2021-05-31