sczlbutt

joined 1 year ago
[โ€“] [email protected] 1 points 1 year ago

Fantastic ๐Ÿ˜

[โ€“] [email protected] 5 points 1 year ago (1 children)

What you want is a bash script and a cron job that calls it. Most of what you need is likely already installed for you.

"crontab -e" will pull up your crontab editor. Check out "man crontab" first to get an idea of the syntax...it looks complicated at first but it's actually really easy once you get the hang of it.

Your script will call tar to create your backup archive. You'll need the path to the folder where your files to backup are and then something like: tar -C PATH_TO_FILES -czf PATH_AND_NAME_OF_BACKUP.tgz .

That last dot tells it to tar up everything in the current folder. You can also use backticks to call programs in line....like date (man date). So if your server software lives in /opt/server and your config files you want to backup are in /opt/server/conf and you want to store the backups in /home/backups you could do something like:

tar -C /opt/server/conf -czf /home/backups/server_bkup.`date +%Y%m%d`.tgz .

Which would call tar, tell it to change directory (-C) to /opt/server/conf and then create (-c) +gzip (-z) into file (-f) /home/backups/blah.tgz everything in the new current directory (.)

I don't know if that's what you're looking for but that would be the easiest way to do it...sorry for potato formatting but I'm on mobile

[โ€“] [email protected] 4 points 1 year ago

I'm so glad you're on Lemmy!

[โ€“] [email protected] 1 points 1 year ago

Now that's a kitty I want to pet!

[โ€“] [email protected] 3 points 1 year ago (1 children)
[โ€“] [email protected] 2 points 1 year ago

Beautiful โค๏ธ

[โ€“] [email protected] 4 points 1 year ago (2 children)

Carnet to replace google keep notes

[โ€“] [email protected] 2 points 1 year ago
[โ€“] [email protected] 1 points 1 year ago

Yes!!! Keep 'em cumming!

[โ€“] [email protected] 1 points 1 year ago

Good news everyone!

view more: โ€น prev next โ€บ