Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Database Backup doesn't contain Docker feeds?

    Scheduled Pinned Locked Moved Support
    proget
    3 Posts 2 Posters 15 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jim.borden_4965
      last edited by

      I have been using proget for quite a while and it's overdue for an upgrade due to various bugs that have been fixed in newer versions, and while I'm at it I would like to upgrade to MSSQL database instance from 2017 to 2022. My thought process is that this would be:

      1. Start new MSSQL docker instance
      2. Backup current MSSQL docker instance
      3. Start new proget docker instance pointed at the new database

      However, I find when I do this the docker feed has vanished according to the newly spun up proget instance. Is there a step I am missing. This is the command I used to backup from MSSQL 2017:

      (I tried both of the following):

      docker exec -it proget-sql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $(cat mssql-pass.txt) -Q "BACKUP DATABASE [ProGet] TO DISK = N'/var/opt/mssql/backup/backup.bak' WITH FORMAT"
      docker exec -it proget-sql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $(cat mssql-pass.txt) -Q "BACKUP DATABASE [ProGet] TO DISK = N'/var/opt/mssql/backup/backup.bak' WITH NOFORMAT, NOINIT, NAME = 'ProGet-full', SKIP, NOREWIND, NOUNLOAD, STATS = 10"

      Then after copying out of docker and into the new docker instance, I restore the new instance:

      (I tried both of the following)
      docker exec -it proget-sql-2022 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $(cat mssql-pass.txt) -Q 'RESTORE DATABASE ProGet FROM DISK = "/var/opt/mssql/backup/backup.bak" WITH FILE = 1, NOUNLOAD, STATS = 10'
      docker exec -it proget-sql-2022 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $(cat mssql-pass.txt) -Q 'RESTORE DATABASE ProGet FROM DISK = "/var/opt/mssql/backup/backup.bak" WITH MOVE "ProGet" TO "/var/opt/mssql/data/ProGet.mdf", MOVE "ProGet_log" TO "/var/opt/mssql/data/ProGet_log.ldf"'

      Either way, the docker feed is missing when the new instance is spun up. Is there any way to resolve this?

      1 Reply Last reply Reply Quote 0
      • J Offline
        jim.borden_4965
        last edited by

        Gosh sorry, I actually forgot to copy the new backup before trying again so the result is that the second variant of these backup and restore do not work (I took these from an older version of the documentation) but the first variants do (these are in the current docs)

        atrippA 1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer @jim.borden_4965
          last edited by

          @jim-borden_4965 glad you got it working :)

          On Windows, you can just do an in-place upgrade of MSSQL, and not worry about database migrations. The same is probably true on Docker, and you can just upgrade container.

          Anyways safer to back-up.

          And if you haven't seen it already, here is the ProGet guidance:
          https://docs.inedo.com/docs/installation-backing-up-restoring

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation