forked from tu500/gickup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
129 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
backup | ||
settings | ||
build | ||
dist | ||
gickup.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Include the license file | ||
include LICENSE.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
Gickup | ||
====== | ||
|
||
This is a script for backing up multiple git repos, keeping local timestamped | ||
copies of all available branches. | ||
|
||
Features | ||
-------- | ||
|
||
* Save state of all remote branches into local branches by current date/time | ||
* Keep track of backed up repositories, automatic batch backup of all known repos | ||
* Configure repository "indices" | ||
|
||
* Scan servers for git repos to auto-add them (using ``ssh find``) | ||
* Scan github user for repos to auto-add them | ||
|
||
How to use | ||
---------- | ||
|
||
.. code:: bash | ||
# Add new repo to backup list manually | ||
gickup addrepo ssh://[email protected] | ||
gickup addrepo https://github.com/user/example.git | ||
gickup addrepo /some/local/path | ||
# Optionally specify a target directory | ||
gickup addrepo ssh://[email protected] /target/dir | ||
# Add github users / ssh server to watch for new repos | ||
gickup addindex --type github user | ||
gickup addindex github://anotheruser | ||
gickup addindex [email protected]:remote/path | ||
# Then scan for unknown repos | ||
gickup updaterepolist | ||
... | ||
# Or scan without configuring | ||
gickup updaterepolist --type github user | ||
... | ||
gickup updaterepolist [email protected]:remote/path | ||
... | ||
# Now do a backup of all known repos | ||
gickup dobackup | ||
# ... or a specific one | ||
gickup dobackup /local/backup/path | ||
Settings | ||
-------- | ||
|
||
``dateformat`` | ||
formatstring used to save remote branches into (``backup/<date>/<name>``) | ||
|
||
``localbasepath`` | ||
directory where backups will be located by default | ||
|
||
``repos`` | ||
configured repos and respective backup directories | ||
|
||
``servers`` | ||
tuples of server-url (with user part) and server-path which will be scanned | ||
for new repos by updaterepolist. | ||
|
||
``github_users`` | ||
a list of github usernames which will be scanned for new repos by | ||
updaterepolist. | ||
|
||
Why "Gickup"? | ||
------------- | ||
|
||
Well, every project needs a name and https://github.com/sciunto-org/gitbackup | ||
beat me to the obvious one. | ||
|
||
On this occasion: Thank you to the one who gave me the suggestion. | ||
|
||
License | ||
------- | ||
|
||
Gickup is licensed under the AGPLv3 or later, see ``LICENSE.txt``. | ||
|
||
Apart from that I'm open to discussion. If you need a different license feel | ||
free to contact me. | ||
|
||
See also | ||
-------- | ||
|
||
* https://github.com/sciunto-org/gitbackup | ||
* https://github-backup.branchable.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[metadata] | ||
license_file = LICENSE.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
from setuptools import setup | ||
|
||
def read(fname): | ||
return open(os.path.join(os.path.dirname(__file__), fname)).read() | ||
|
||
setup( | ||
name = 'gickup', | ||
version = '1.0', | ||
url='https://github.com/tu500/gickup', | ||
author = 'Philip Matura', | ||
author_email = '[email protected]', | ||
description = ('Automatic git backup script for multiple repositories'), | ||
keywords='git backup', | ||
license='AGPLv3+', | ||
packages=['gickup'], | ||
long_description=read('README.rst'), | ||
entry_points=''' | ||
[console_scripts] | ||
gickup=gickup.__main__:main | ||
''', | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Console', | ||
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', | ||
'Operating System :: POSIX :: Linux', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Topic :: Software Development :: Version Control :: Git', | ||
'Topic :: System :: Archiving :: Backup', | ||
], | ||
) |