The Automatic Database Backup module streamlines the task of scheduling backups for databases, making it easy to store them in different locations such as local drives, FTP servers, SFTP servers, Dropbox, Google Drive, OneDrive, NextCloud, and Amazon S3 Cloud Storage. Users can also opt for the automatic removal of outdated backups and receive email notifications about the success or failure of backup generation and storage. This module offers users a seamless way to generate and store database backups in multiple destinations.
What is Amazon S3?
Amazon S3, or Amazon Simple Storage Service, is a highly scalable and secure object storage service provided by Amazon Web Services (AWS). Its core functionality is centered on enabling the storage and retrieval of data, regardless of the amount or origin, across the internet.
Features of Amazon S3
1. Scalability:
Amazon S3 is built to handle large volumes of data and can scale to accommodate any storage requirements. It allows you to store virtually unlimited amounts of data without worrying about capacity constraints.
2. Durability and Availability
S3 provides a highly durable infrastructure that automatically duplicates your data across multiple devices within a selected AWS region. This duplication guarantees the safeguarding of your data against hardware failures and offers robust accessibility to your files, ensuring high availability.
3. Security
Amazon S3 offers several security mechanisms to protect your data. You can configure access control policies, manage user permissions, and use encryption options to secure your data in transit and at rest. S3 also seamlessly integrates with AWS Identity and Access Management (IAM), allowing for precise control over access permissions.
4. Data Lifecycle Management
S3 allows you to define lifecycle rules to automate the movement of your data between different storage classes based on predefined criteria. This feature helps optimize costs by automatically transitioning data to lower-cost storage tiers or even archiving them to Amazon Glacier for long-term retention.
5. Versioning and Replication
S3 supports versioning, which enables you to keep multiple versions of an object in the bucket. It also offers cross-region replication, allowing you to replicate data between different AWS regions for disaster recovery or compliance purposes.
6. Performance and Speed
Amazon S3 provides high-speed data transfers, allowing you to quickly upload and retrieve data from the service. It supports parallel uploads and downloads, making it ideal for applications that require fast and efficient data transfer.
7. Integration with Other AWS Services
S3 seamlessly integrates with various AWS services, such as AWS Lambda, Amazon Athena, Amazon EMR, and Amazon CloudFront, enabling you to build scalable and powerful applications that leverage the capabilities of these services.
How to create an account in Amazon S3
To Create an account in Amazon S3 go to https://portal.aws.amazon.com/billing/signup#/start/email, Enter Your Email Address and Sign up.
How to get the Access Key and Secret Key for the App
To Get the Access Key and Secret Key go to the Security Credentials
Within the "Security Credentials" section of your AWS account, you will find the "Access Key" tab. Clicking on this tab allows you to generate your own unique Access Key and Secret Key. These credentials are essential for authenticating your application with the AWS API. It's important to note that you can only create a maximum of two Access Keys at any given time.
In this section, you will find and retrieve your Access Key and Secret Key. They will already be generated and available for you to access.
How to create Bucket in Amazon S3
To begin uploading your data, such as photos, videos, documents, and more, to Amazon S3, you need to create an S3 bucket within one of the available AWS Regions. An S3 bucket acts as a storage container for objects within Amazon S3. Each bucket has the capacity to hold numerous objects, and within your AWS account, you can have a maximum of 100 buckets.
Navigate to "Services" as shown in the screenshot below. From there, select "Storage," and within it, locate and click on "S3."
Click on the "Create Bucket" button to create your bucket folder.
This bucket serves as a storage location for folder and database backups.
Let’s see how to configure the App:
First, Install Odoo 16 Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox, Onedrive, NextCloud, and Amazon S3 Cloud Storage.
Download the app from the Odoo store using the link below and install it.
Odoo App Link: Automatic Database Backup To Local Server, Remote Server, Google Drive, Dropbox, One Drive, NextCloud and Amazon S3 | Odoo Apps Store
Database Backup Configuration Menu:
Navigate to "Settings" - "Configuration" - "Backup Configuration" to access the configuration settings for backups.
Store Backup to Amazon S3
Enter the Database name and Master Password. Configure the backup destination by selecting Amazon S3. Enter the required credentials, including the Amazon S3 Access Key and Amazon S3 Secret Key. Specify the Bucket Name, which corresponds to the folder you have created in Amazon S3, and provide the desired File Name for storing your backup within the Amazon S3 Bucket Folder. To verify the connection's success, use the "Test connection" button.
Every day, a Scheduled Action will be executed to store a backup on the Amazon S3 Server. The backup will be saved in a bucket.
Inside the bucket folder, you will find a folder named after the ‘File Name’ you specified for storing your backup.
The backup will be stored using the database name and the current day, indicating the time when the backup is stored.
Automatically Remove Old Backups
To enable the automatic removal of old backups, review the boolean field "Remove Old Backups." If the field value is set to true, you can specify the number of days after which stored backups will be automatically deleted.
Notify the User of the Success or Failure of Backup Generation
To keep the user informed about backup status, enable the "Notify User" option and choose a user to receive notifications. The selected user will be notified via email in case of successful or failed backup generation, receiving pertinent information regarding the backup status. This ensures that the user stays updated on the outcome of their backup operations.
When a backup is successful, a Notification email will be sent to the user, as shown below.
When a backup is failed, a Notification email will be sent to the user, as shown below.
Scheduled Action For Generating Backup
Configure the execution interval and activate the scheduled operation named "Automatic database backup." This will ensure that backups are generated periodically according to the predefined schedule for the scheduled task, guaranteeing regular and consistent backup creation.
The form view of the scheduled action provides users with a well-organized interface to easily configure and manage their scheduled actions. Within this form, users can input and customize various settings, including frequency, timing, and specific execution details for the scheduled action. By utilizing this form, users can conveniently define and modify their scheduled actions based on their specific needs and preferences, ensuring a seamless scheduling experience.
This article has comprehensively covered all the functionalities of Automatic Database Backup to Amazon S3. I trust that you now have a clear understanding of how it should function.