Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


is it possible to recover overwritten files with rsync?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

is it possible to recover overwritten files with rsync?

I made an horrible mistake,
I have accidentally overwritten some php files with rsync and now I just have an old copy of those.
Is there a way to recover the original files in any way?
I'm on a yearly OpenVZ container and extundelete won't work.

Also do you have any idea if crissic keeps backups of the servers? Those files never changed. I read on lowendbox that they keep weekly backups while on their TOS they say they don't so I'm not sure. I opened a ticket waiting for a reply. I'd like to know if there's still a chance or if I need to start coding again!

Thank you for the support guys.

Comments

  • I can't answer about Crissic's implementation but if you use a version controller eg git, subversion, etc then you can always pull files back from your last commit.

  • MarkTurner said: I can't answer about Crissic's implementation but if you use a version controller eg git, subversion, etc then you can always pull files back from your last commit.

    >

    could you explain how?

  • LeeLee Veteran

    @sandro, well the question first is whether you use version control? If not then that is out.

    If you are as I suspect overwriting the same files each time then it's not likely that you can recover the old files unless they were not altered which does not appear to be the case.

    So your best option is to find out if crissic do take backups and at what interval to see if they may have the files from a point you need them.

    Perhaps now is also a good time to assess your rsync strategy and make several backup points in the week.

    Thanked by 1ucxo
  • raindog308raindog308 Administrator, Veteran

    There's not a way in the sense of some -reverse_what_i_did flag to rsync.

    If you were using version control, you'd know it.

    Your best bet is probably Crissic's backups, if they do them - not all providers do.

    Sorry there is no better answer...data loss sucks. The best advice is to save multiple versions on multiple hosts.

  • @raindog308 said:
    Sorry there is no better answer...data loss sucks. The best advice is to save multiple versions on multiple hosts.

    This. Also, going forward, learn to use Git. Seriously saves a lot of frustration with this type of thing.

  • JustAMacUser said:

    This. Also, going forward, learn to use Git. Seriously saves a lot of frustration with this type of thing.

    Unless .git was overridden too! LOL!

  • W1V_Lee said: Perhaps now is also a good time to assess your rsync strategy and make several backup points in the week.

    Oh yeah. Use rsnapshot:

    http://abdussamad.com/archives/361-Automating-incremental-backups-with-Rsnapshot.html

    Very easy to setup and you can do multiple servers!

    Thanked by 1Lee
  • As of right now Crissic does not do any VPS backups. However planning & implementation is in progress.

    In the mean time, I highly recommend all of our clients to perform their own backups.

  • You can typically recover files if the disk isn't written to again after the files were deleted. If you write more data to the disk after the file was deleted, it becomes much more difficult to recover the file.

Sign In or Register to comment.