cancel
Showing results for 
Search instead for 
Did you mean: 

How to backup to cloud like S3, Dropbox or Drive?

Highlighted

How to backup to cloud like S3, Dropbox or Drive?

Not sure if this is the right board, but here it goes... How would you backup the whole installation of Magento 2 into cloud service like S3, Dropbox or Drive? It would need to be done regularly and also the automatic deleting of old backups from the cloud and server should be handled.

 

Is there some script available somewhere or is there any extension for this?

5 REPLIES 5
Highlighted

Re: How to backup to cloud like S3, Dropbox or Drive?

Hello @kuono 

 

I think you don't need to do backup of whole data, you can just setup code in git repository and schedule a daily basis of Database back for which your server provider may help.

Make sure you follow the correct git init approach.

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !
Highlighted

Re: How to backup to cloud like S3, Dropbox or Drive?

@gaurav_harsh1 Git might work for the code base, but client wants to have a separate off site backup for ALL data (DB, media, code etc.). Hosting provider is not able to provide off site backup services. Their backups are located on the same server hall and client want's backups to be physically at another place.

Highlighted

Re: How to backup to cloud like S3, Dropbox or Drive?

I've had good experience in the past using rclone on linux but that depends if you have SSH access to your hosting provider or not?

 

https://rclone.org/

 

If your on a shared hosting platform you might need to get a bit more creative and configure a daily download via FTP.

--
Problem solved? Click Accept as Solution!
Highlighted

Re: How to backup to cloud like S3, Dropbox or Drive?

@astue Thank you for the suggestion. We do have SSH access. I will look into rclone.

Highlighted

Re: How to backup to cloud like S3, Dropbox or Drive?

You can write a simple bash script (or have your hosting provider do it) that will automatically compress your files and dump your database, then transfer it to an offsite backup service. 

 

If you use S3, the bash script will need to use AWS CLI to transfer the backed up files and if you use an offsite backup storage service, the backup script can incorporate utilities like Rsync, Duplicity or even Borg to transfer the backup files.