Compare commits

...

34 Commits

Author SHA1 Message Date
37e0986745 „README.md“ ändern 2023-04-18 21:07:31 +02:00
6e11715467 „README.md“ ändern 2023-04-18 20:58:45 +02:00
67c7a66b51 „README.md“ ändern 2023-04-18 20:58:34 +02:00
356689bb76 „README.md“ ändern 2023-04-18 20:58:27 +02:00
cc0b03e7ff „README.md“ ändern 2023-04-18 20:58:19 +02:00
264fc248ba „README.md“ ändern 2023-04-18 20:58:10 +02:00
3e44f9f2e6 „README.md“ ändern 2023-04-18 20:58:02 +02:00
fd1fcd3530 Dateien hochladen nach „“ 2023-04-18 20:57:02 +02:00
50eef7658f „README.md“ ändern 2023-04-18 20:41:49 +02:00
676292be85 „install.sh“ ändern 2023-04-18 20:39:59 +02:00
7e19fe7d19 „README.md“ ändern 2023-04-18 20:39:42 +02:00
49139fb445 „README.md“ ändern 2023-04-18 20:39:06 +02:00
c109be46f7 „README.md“ ändern 2023-04-18 20:33:41 +02:00
a426f1af49 „README.md“ ändern 2023-04-18 20:31:34 +02:00
8744a50562 „README.md“ ändern 2023-04-18 20:29:51 +02:00
3f3c743262 „README.md“ ändern 2023-04-18 20:29:10 +02:00
273994e82a „README.md“ ändern 2023-04-18 20:28:53 +02:00
400dd25e7d „README.md“ ändern 2023-04-18 20:27:14 +02:00
df55cbd534 „README.md“ ändern 2023-04-18 20:26:41 +02:00
55ca28e9cb „README.md“ ändern 2023-04-18 20:25:51 +02:00
b39abe8cc0 „README.md“ ändern 2023-04-18 20:20:11 +02:00
d7b73ed6e9 „README.md“ ändern 2023-04-18 20:19:26 +02:00
024690be38 „README.md“ ändern 2023-04-18 20:19:13 +02:00
8cac2026ce „README.md“ ändern 2023-04-18 20:18:47 +02:00
8976ba7deb „README.md“ ändern 2023-04-18 20:18:20 +02:00
36761eefba „README.md“ ändern 2023-04-18 20:17:19 +02:00
ca0ba76fae „README.md“ ändern 2023-04-18 20:16:38 +02:00
7ec219bb67 „README.md“ ändern 2023-04-18 20:16:17 +02:00
58f9712e53 „README.md“ ändern 2023-04-18 20:15:52 +02:00
568b7ac2f1 „README.md“ ändern 2023-04-18 20:14:55 +02:00
5b33466451 „README.md“ ändern 2023-04-18 20:14:19 +02:00
582e3f5248 „README.md“ ändern 2023-04-18 20:14:02 +02:00
e372037040 „README.md“ ändern 2023-04-18 20:13:26 +02:00
823d0a6969 „README.md“ ändern 2023-04-18 20:13:06 +02:00
3 changed files with 40 additions and 6 deletions

View File

@ -1,5 +1,10 @@
# Folder archive
> Daily Folder Backup and Rotation for Linux
# Folder2Archive
<img align="right" width="150" src="https://git.moelle.space/hxcde/folder2archive/raw/branch/main/f2a.png">
<br>
> Daily Folder Backup and Rotation for Linux <br>
> I use this to create archives of my website every day
## Key Features:
- Daily automated backups of a specified folder using the zip utility.
@ -18,14 +23,41 @@
Paste the script in your machines console.
```bash
sh -c "$(curl -L http://script.moelle.space/folderarchive)"
sh -c "$(curl -L http://script.moelle.space/folder2archive)"
```
## Settings
<details>
<summary>Change the day count </summary>
<br>
Edit the file zip_folder_daily.sh `(If you used automatic install it's in /opt)` and change the day number in line 16.
<br> If you want 30 days, it's `30 minus 1`, so `29`
```bash
find "${ARCHIVE_DIR}" -name "folder_*.zip" -mtime +13 -exec rm {} \;
```
Example: Chamge the `13` to `29`
```bash
find "${ARCHIVE_DIR}" -name "folder_*.zip" -mtime +29 -exec rm {} \;
```
</details>
<details>
<summary>Change the schedule </summary>
<br>
Edit the cronjob with `crontab -e`
```bash
0 13 * * * sh /path/to/script/zip_folder_daily.sh
```
If you need help to configure the crontab, check this site https://crontab.guru/
</details>
## Manual installation
<details>
<summary>expand </summary>
<summary>Installation </summary>
<br>
Install git and zip
@ -34,8 +66,10 @@ apt install git zip -y
```
Clone the repository
```bash
git clone https://git.moelle.space/hxcde/folderarchive.git
git clone https://git.moelle.space/hxcde/folder2archive.git
```
Edit the zip_folder_daily.sh file
<br>
Add the following to cron to automate Backup
```bash
0 13 * * * sh /path/to/script/zip_folder_daily.sh

BIN
f2a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -13,7 +13,7 @@ echo "# Enter the directory where the zipped files will be stored (e.g., /path/t
echo "Enter the directory where the zipped files will be stored (e.g., /path/to/archive)"
read archive
echo "ARCHIVE_DIR='"$archive"'" >> zip_folder_daily.sh
curl https://git.moelle.space/hxcde/folderarchive/raw/branch/main/append >> zip_folder_daily.sh
curl https://git.moelle.space/hxcde/folder2archive/raw/branch/main/append >> zip_folder_daily.sh
sh /opt/zip_folder_daily.sh
crontab -l > mycron