Skip to content

A script to help make simple backups in a Linux system

Notifications You must be signed in to change notification settings

petermlm/backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

BackUp is a small script to help me create quick and dirty tar file containing backups of my file system.

I developed this script because I had a few directories in separate locations and I wanted to back them up into a single tar file.

Also because back in 2013 I was new to Git and GitHub and wanted to try these things.

Arguments

-h             - Display help
-b bu_file     - bu_file location. Defaults to the script's directory
-o target_file - The resulting tar file. Default to the script's directory

How To Use

BackUp works by reading from a file, called bu_files, which contain the files and directories you want to store to the target tar file. The directories may be absolute or relative.

For example, if bu_files has:

/home/someuser/Documents/
/home/someuser/Images/
local_file
local_directory

The contents of the tar file will be:

backup_2013_06_23.tar
|--Documents/
|--Images/
|--local_file
|--local_directory

The location of each file/directory is not preserve in the tar file. Because of that there can't be two files with the same name, like for example:

/dir1/file
/dir2/file

The script warns the user about this.

Entries in bu_files can be use to exclude certain directories. They should be appended with a - like so:

-node_modules

Run Tests

python3 test.py

About

A script to help make simple backups in a Linux system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages