ZFS Snapshots To S3 Bucket Backup/Restore Using Z3 Tool

freebsd

Source for the Z3 tool is at https://github.com/presslabs/z3 . This source will backup the zfs snapshots to a S3 bucket. I have made some modifications with the help of boto3 and botocore python modules and made the Z3 tool to restore the snapshots too from the S3 bucket.

 

Compiled and modified Z3 tool files are at https://gitlab.com/freebsd1/z3 . Since it’s a public repository, anyone can download it and follow the instructions in README file.

 

Once all the files are moved over to the appropriate location, we can configure the z3 tool using z3.conf file located at /etc directory.

 

Z3 Configuration:

  • BUCKET => This field requires the name of the S3 bucket.
  • S3_KEY_ID => It is the ACCESS KEY ID provided by the Amazon. For reference click here.
  • S3_SECRET => Secret Access Key provided by the Amazon to access S3. For reference click here.
  • S3_REGION => Region name where you have created S3 bucket.
  • host => Hostname of your S3 bucket, make sure it includes region name.

Above fields are mandatory and rest parameters determines the working nature of z3 tool.

 

S3_PREFIX => This prefix name is used where all your zfs snapshots are stored under it. So there will be a directory created in the bucket and backups are stored under it.

FILESYSTEM => z3 take snapshot of filesystem by default when specified.

SNAPSHOT_PREFIX => To backup only certain snapshots.

COMPRESSOR => To default compression level.

COMPRESSOR=pigz4

 

Viewing status for the transferred snapshots in s3 bucket

 

#z3 –filesystem tank/data status

z3 status check

 

 

 

 

 

 

Transferring zfs file system snapshot to a S3 bucket

 

#z3 –filesystem tank/dummy backup –snapshot snap_oct14

z3 backup

 

Here snapshot name is specified and also the filesystem parameter is specified to backup the snapshot of particular zfs dataset.

 

Restoring zfs file system from the snapshot located in S3 bucket.

 

#z3 –filesystem tank/dummy restore snap_oct14 –force

z3 restore

 

 

Here ‘force’ option is used since the snapshot ‘snap_oct14’ type is incremental.  Before restoring, the file system ‘tank/dummy’ is completely destroyed using the command ‘zfs destroy –r tank/dummy’.

 

Now we can use this z3 tool to store & retrieve zfs snapshots from a remote S3 bucket.

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
More Interested Related Posts
zfs pool usage

ZFS Pool and Dataset Usage

ZFS Pool and Dataset Usage I am back with another blog to provide the useful script to the Freebsd users to determine the zpool and

Assistanz Networks

Installing Zabbix Agent in FreeBSD 12.0

Zabbix Agent Installation and Configuration Guide on FreeBSD 12.0   Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support