.
This commit is contained in:
commit
ebf4b84c5d
26
TODO.txt
Normal file
26
TODO.txt
Normal file
@ -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) -
|
Loading…
Reference in New Issue
Block a user