commit ebf4b84c5d1fa81107619d172a3ca3585e06d9ed Author: Skylar Grant Date: Tue Sep 21 21:26:29 2021 -0400 . diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..5845c02 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,26 @@ +What will need to be backed up? +- confirm paths on screen +($HOME) +/var/www + +Where will it backup to? +x Prompt for current dir/new dir? + Or maybe passed as an arg? + +File name? Get the date and time automatically +date "+%Y%m%d_%H%M" + +Command: +$timestamp = $(date "+%Y%m%d_%H%M") +$filename = "backup_$timestamp.tar.gz" +tar -czvf /tmp/$filename /var/www $HOME | grep 'tar:' + +Save variables to a file in /tmp, and read them on launch +only way to save variables across instances of the script + +Find a way to see grep returns no results and convey that to the user + +Add option to generate a reusable run&forget script that'd work with cron for automation +Maybe ability to add an entry to the user's crontab automatically? + line="* * * * * /path/to/command" + (crontab -u $(whoami) -l; echo "$line" ) | crontab -u $(whoami) - \ No newline at end of file