Skip to content

bamoo456/backup-to-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backup-to-s3

It's a simple python commandline script for archiving a folder and upload it to the s3.

Reqiurements

  • Python3.8+
  • Poetry
  • Pip (optional)

Usage

Install poetry dependencies

poetry install

Run with poetry

AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials \
AWS_PROFILE=profile.dev \
poetry run backup_to_s3 \
-i ~/backup-folder/
-s s3://your-bucket/backup/folder/name

Install backup_to_s3 as sysstem script

For achieving this, we have to use poetry build to generate a tar file for pip install. The detail steps can be found as following:

Build backup_to_s3 tar file

cd backup-to-s3/
poetry build

The built tar.gz should be put under backup-to-s3/dist.

Install the built file as system script

pip install backup-to-s3/dist/backup-to-s3.xxx.tar.gz

Run the backup_to_s3 system script

AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials \
AWS_PROFILE=profile.dev \
backup_to_s3 \
-i ~/backup-folder/
-s s3://your-bucket/backup/folder/name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages