After the GitLab disaster I am rethinking certain aspects of our prod set up. In case of any urgency, what should we use? Is there any safer rn -fr?
Similar to what @chakrihacker said. Just rename the directory or if it's files, place in a tmp directory while you do your other deployment tasks. After all other tasks are complete and you've verified the deployment to be successful, backup what was in the tmp directory and remove it.
One approach is to create your own command like rem(remove) or tr(trash) and set a path for it, Give those commands a functionally like move all files to a directory you mentioned in path. Hope it helps
Emil Moe
Senior Data Engineer
If I ever have to touch production data and especially the database (the code is stored in a git, so that's fast to restore). I always close down the site for maintenance and do a full backup before I do anything.