From 7939805687e75f8a46cd6c43a80e9fb3db88da81 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Mon, 7 Mar 2022 21:18:44 +0000 Subject: Add Installing Docker on Arch Linux --- www/posts/git/2021-06-13/backing-up-a-git-repository/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'www/posts/git/2021-06-13/backing-up-a-git-repository/index.html') diff --git a/www/posts/git/2021-06-13/backing-up-a-git-repository/index.html b/www/posts/git/2021-06-13/backing-up-a-git-repository/index.html index 4c0c090..655f536 100644 --- a/www/posts/git/2021-06-13/backing-up-a-git-repository/index.html +++ b/www/posts/git/2021-06-13/backing-up-a-git-repository/index.html @@ -34,7 +34,7 @@ tar -czf $BACKUP_FILE $REPOSITORIES find $BACKUP_FILES -mtime +3 -delete -exit 0

All it does it tar and gzip any .git directories found under /home/git. It also removes any backups that are more than three days old.

This script has been saved as /usr/bin/backup_repositories and is ran daily via cron.

0 3 * * * /usr/bin/backup_repositories > /dev/null 2>&1

It is important to know that this backup strategy is far from ideal for repositories that are heavily used as you run the high risk of trying to backup a repository as users are pushing to it. As git updates a repository in two phases this will lead to a backup that may not contain all the data and so won't be suitable for restoring. However its fine for my purposes since I'm the only user and it's unlikely that I will be making changes during the time the backup is running.

Links

2021-05-29 - Setting up a Self Hosted Git ServerGit - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.

Email david@davidtsadler.com

License

The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

Return to Homepage. +exit 0

All it does it tar and gzip any .git directories found under /home/git. It also removes any backups that are more than three days old.

This script has been saved as /usr/bin/backup_repositories and is ran daily via cron.

0 3 * * * /usr/bin/backup_repositories > /dev/null 2>&1

It is important to know that this backup strategy is far from ideal for repositories that are heavily used as you run the high risk of trying to backup a repository as users are pushing to it. As git updates a repository in two phases this will lead to a backup that may not contain all the data and so won't be suitable for restoring. However its fine for my purposes since I'm the only user and it's unlikely that I will be making changes during the time the backup is running.

Links

2021-05-29 - Setting up a Self Hosted Git ServerGit - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.

Email david@davidtsadler.com

License

The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

Return to Homepage. -- cgit v1.2.3-13-gbd6f