Menu

Tree [ce5263] master /
 History

HTTPS access


File Date Author Commit
 agents 2017-03-08 d33pcode d33pcode [d9e983] sbam: removed old imports
 tests 2017-03-08 d33pcode d33pcode [b2cca1] sbam: more cleanup
 .gitignore 2016-10-17 d33pcode d33pcode [d1b7bd] Adjusted .gitignore, removed some compiled file...
 .travis.yml 2017-02-10 d33pcode d33pcode [d33e73] tests: oh this could be the last time
 LICENSE 2016-10-17 d33pcode d33pcode [250266] First commit.
 README.md 2017-10-14 d33pcode d33pcode [41e841] sbam: exiting if no args + small README correction
 requirements.txt 2017-03-08 d33pcode d33pcode [b2cca1] sbam: more cleanup
 sbam.py 2017-10-14 d33pcode d33pcode [41e841] sbam: exiting if no args + small README correction

Read Me

Sbam


Build Status

Sbam is a Python2 utility that aims to help you manage your backups with ease.

It provides functions to backup and restore directories, list the current backups and optional password protection, too.

Installation


  • Clone the project
  • Install the requirements with sudo pip install -r requirements.txt
  • sudo ln -s /path/to/sbam/sbam.py /usr/bin/sbam to use it outside its folder. In the rest of this file I'll assume you can run sbam from everywhere in the terminal. If you skip this step, you can use ./sbam.py inside your installation folder.

Basic usage


To compress a folder, simply use:

sbam -f folder/to/compress

Sbam will compress it in /var/backups/sbam and automatically register the newly created backup.
You can restore it with sbam -r.

The restore function, without arguments, will decompress your last backup and move it to its original path.
You can optionally specify a folder to restore:

sbam -r folder/to/restore

Note that this will work even if the folder does not longer exist. That's because sbam stores by default its backups in a small sqlite database.
To see a list of your last backups, simply use:

sbam -l                           # lists the last 3 backups
sbam -l 10                        # lists the last 10 backups

Warning: Sbam keeps track of your backup date, too. If you already backed up a folder today, any other backup of that folder will replace the previous one.

Encryption


The -e option will encrypt the compressed folder and password-protect it.

sbam -ef folder/to/backup

This will prompt you for a password.

If you don't want Sbam to register your backup, use the --forget option while backing up the folder:

sbam -Ff folder/to/compress

This backup will be stored in /var/backups/sbam too, but it will not be shown in the list.
Note: the list is automatically updated every time sbam -l is called. This means that if you manually remove a backup, the entry will be removed from the database, too.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.