DEV Community

AntDB
AntDB

Posted on

Manager Handbook for Distributed AntDB-T - P20–4

Data backup
Back up a datanode
If there are multiple datanodes to be backed up, this command needs to be executed separately. If the user wants to restore based on barrier points later, he needs to log in to any coordinator and create a barraier before backing up.

[antdb@localhost1 ~/barman]$ barman backup dm0 
Starting backup using rsync-exclusive method for server dm0 in /home/antdb/barman/data/dm0/base/20190129T150740 
Backup start at LSN: 0/1C000060 (000000010000000000000007, 00000060) 
This is the first backup for server dm0 
WAL segments preceding the current backup have been found: 
        000000010000000000000005 from server dm0 has been removed 
Starting backup copy via rsync/SSH for 20190129T150740 (3 jobs) 
Copy done (time: 2 seconds) 
This is the first backup for server dm0 
Asking PostgreSQL server to finalize the backup. 
Backup size: 207.2 MiB. Actual size on disk: 207.2 MiB (-0.00% deduplication ratio). 
Backup end at LSN: 0/1C000130 (000000010000000000000007, 00000130) 
Backup completed (start time: 2019-01-29 15:07:41.584111, elapsed time: 3 seconds) 
Processing xlog segments from file archival for dm0 
        000000010000000000000006 
        000000010000000000000007 
        000000010000000000000007.00000060.backup 
Enter fullscreen mode Exit fullscreen mode

View all backup data of a node

[antdb@localhost1 ~/barman]$ barman list-backup dm0 
dm0 20190129T150740 mode: rsync-exclusive tar:None - Tue Jan 29 15:16:29 2019 - Size: 207.3 MiB - WAL Size: 0 B 
Enter fullscreen mode Exit fullscreen mode

View the details of a particular backup, where 20190129T150740 is the backup_id.

[antdb@localhost1 ~/barman]$ barman show-backup dm0 20190129T150740 
Backup 20190129T150740: 
  Server Name            : dm0 
  Status                 : DONE 
  PostgreSQL Version     : 100004 
  PGDATA directory       : /home/antdb/pgdata_xc/datanode/0 

  Base backup information: 
    Disk usage           : 207.2 MiB (207.3 MiB with WALs) 
    Incremental size     : 207.2 MiB (-0.00%) 
    Timeline             : 1 
    Begin WAL            : 000000010000000000000007 
    End WAL              : 000000010000000000000007 
    WAL number           : 1 
    WAL compression ratio: 99.89% 
    Begin time           : 2019-01-29 15:16:25.814768+08:00 
    End time             : 2019-01-29 15:16:29.837834+08:00 
    Copy time            : 2 seconds 
    Estimated throughput : 86.0 MiB/s (3 jobs) 
    Begin Offset         : 96 
    End Offset           : 304 
    Begin LSN           : 0/1C000060 
    End LSN             : 0/1C000130 

  WAL information: 
    No of files          : 0 
    Disk usage           : 0 B 
    Last available       : 000000010000000000000007 

  Catalog information: 
    Retention Policy     : VALID 
    Previous Backup      : - (this is the oldest base backup) 
    Next Backup          : - (this is the latest base backup) 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)