Skip to content

My migration script deleted all .htaccess files

Web Hosting by FlowSana 4 replies 176 views
#1
  • Source: RackNerd shared, destination: OVHcloud VPS
  • Used rsync with --exclude pattern intended for .git, typo made it .*
  • 47 sites migrated, all .htaccess files excluded
  • Old host cancelled 6 hours ago, no snapshots available
  • Partial recovery: 12 sites have .htaccess in Git repos

Immediate steps taken:

  • Terminated rsync, preserved destination state
  • Checked local backups: last from March 2026
  • Contacted OVHcloud support, 24-48h response time

Seeking recovery methods for the 35 sites without version control. Mod_rewrite rules were complex in several cases.

Recommendation: Always test exclude patterns with --dry-run.

It's always DNS. Always.
#2

You check browser cache? Some rules can be recovered from wayback. Also check if cpanel backup stored .htaccess separately. What control panel used on RackNerd?

phở at 3AM, deploy at 4
#3

Enterprise-grade migrations require enterprise-grade snapshot policies across redundant feeds. N+1 backup strategy is enterprise-grade standard. Our enterprise-grade platform maintains enterprise-grade consistency checks. For enterprise-grade migration services, contact sales regarding redundant feed options and enterprise-grade pricing structures.

#4

They hadn't mentioned cancelling the old server. The ticket also said "we assumed you'd handle everything." The ticket did not mention they ran chmod -R 777 three days prior. I found this out later. I found it all out later.

4 #5

That is very bad. You have access logs? Sometimes you can reconstruct rewrites from 404 patterns. Also check if any of your clients have local copies, some devs keep random backups. For this many sites you might be better off rebuilding from scratch than trying to recover.

world record: 4min Arch install

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft