Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (18 loc) · 897 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 897 Bytes

Go backup script

Simple backup script written in go.

USAGE: BackupFrom BackupTo Duration

EXAMPLES:

Backup with removing old backups that were created more than 24h ago:
backupscript /home/washingmachine/desktop/new /backup -24h
backupscript.exe C:\Users\washingmachine\Desktop\new C:\Users\washingmachine\Desktop\ -24h

Only backup:
backupscript /home/washingmachine/desktop/new /backup
backupscript.exe C:\Users\washingmachine\Desktop\new C:\Users\washingmachine\Desktop\

BackupFrom: Path from where it will copy the files

BackupTo: Path where it will put the .tar.gz backup

Duration (optional): For example, if you enter -24h, the program will delete all backups that were created more than 24 hours ago

More info about duration

100% working duration units are "m" and "h"

Theoretically you can use "ns", "us" (or "µs"), "ms", "s" too, but I didn't check it if it works.