Score:0

Schedule a folder backup on Ubuntu and delete older backups

jp flag

I am trying to create a backup on my Ubuntu machine and schedule it. The backup should zip a dir and its subdirs then delete zip files older than 30 days. I wrote this shell:

zip -r  "/home/azureuser/foundrybackup/Data_$(date +'%m%d%y').zip" /home/azureuser/.local/share/FoundryVTT/Data/
find /home/azureuser/foundrybackup -name "*.zip" -type f -mtime +30 -delete 

but for some reason when I run the shell it results in:

        zip warning: name not matched: /home/azureuser/.local/share/FoundryVTT/Data/

)ip error: Nothing to do! (try: zip -r Data_20211010.zip . -i /home/azureuser/.local/share/FoundryVTT/Data/

I am confused. The zip command works fine outside the shell. What am i doing wrong?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.