I would like to be able to copy the entire site collection http://server.ltd/sites/ABC to http://server.ltd/sites/DEF
is there any easy solution, because I tried to Save as template at the site level then tried to upload the solution to the newly created site collection but it failed.
Is this even possible ?
You can use powershell for that:
Backup-SPSite -Identity http://server.ltd/sites/ABC -Path c:\temp\abc.bak
and then restore with:
Restore-SPSite http://server.ltd/sites/DEF -Path c:\temp\abc.bak
Make sure you check the available options like preserving security information, versioning, etc:
http://technet.microsoft.com/en-us/library/ee748617(v=office.14).aspx
http://technet.microsoft.com/en-us/library/ff607788.aspx
you can backup sitecollection with powershell and restore it again in new path ,
this link could help you.
Related
I'm trying to build aspnetcore artifact for a solution with multiple web projects inside. Default netcore publish task has checkbox "Publish Web Projects" that finds all projects containing web.config or wwwroot folders, but my WebApi projects doesn't need them at all.
You can disable this checkbox and provide paths to projects you want to publish. Each project must be provided in separate line.
So, if I edit this setting in task properties window, everything is ok, cause there is multiline editor that behaves as expected. But I want to move list of projects to variables, were all other configuration is stored. However variable's editor is singleline.
I've decided to put project names in variable with ";" delimiter and write powershell task that properly constructs paths for publish task:
$projects = '$(PublishProjects)'
$result = ( $projects.Split(#(';'), [System.StringSplitOptions]::RemoveEmptyEntries) | %{ ('**\' + $_.Trim() + '.csproj') } ) -join "`n"
Write-Host "##vso[task.setvariable variable=PublishProjectsPath]$result"
Unfortunately this results in setting PublishProjectsPath`s value to only first project, cause all project paths except first one are printed on their own line without ##vso... and so azure ignores them effectively.
Is there any way to set pipeline variable from script correctly?
I cannot use azure-pipelines.yml cause azure doesn't support gitlab :(
Set variable in script with string value that contains newline
For this issue , I am afraid this is currently not support in azure devops. Although dotnet publish task has the textboxes that support multiple line content , but currently does not support multi-line string as the value of a variable.
Until now, in our official feature suggestion for Azure Devops forum, there has been a such suggestion exist in it: https://developercommunity.visualstudio.com/idea/365667/multiple-lines-variable-in-build-and-release.html.
You could vote that suggestion ticket and share your comment there,the product team would provide the updates if they view it. Anyone interested in this can vote for it and track it.
Yous set the variable as job-scoped.
You need to set a multi job output variable with ##vso[task.setvariable variable=myOutputVar;isOutput=true]
I can't seem to figure out how to export a data source configuration in DataGrip (currently on 2016.2 EAP).
I would like to export a handful of data sources and share them with my teammates to make it easier for them to get up and running on DG.
I've tried File->Export Settings (exporting all settings) and did not notice the data source configurations within the resulting jar file.
I seem to recall that in earlier versions of the tool (when it was still called 0xDBE), you could find data source configuration files on the drive and share them that way, but I am unable to locate any at this time.
Perhaps it's not possible?
UPDATE FROM 2021!
Starting from version 2021.1, you can just press Ctrl/Cmd+C on the data source, and then Ctrl/Cmd+V it in another IDE. The clipboard contains XML for the data source, so you can send it to the colleague via e-mail, messenger etc.
It is possible!
You need to share a project with your friend — all you do in DataGrip is in the context of a project. If you did not create a new one, everything is under the default project. Look at the gif:
The more detailed information can be found in the tutorial: https://blog.jetbrains.com/datagrip/2018/05/21/copy-and-share-data-sources-in-datagrip/
You can do it easily via the clipboard, although it took me a while to figure it out:
in your source project, open the Database tool window, select the data sources you want to export, then right click / "Database Tools..." / "Copy Settings"
in your target project, open Database tool window, click on "+" then "Import from Clipboard"
Also works between DataGrip and IntelliJ.
Addendum
The wording has changed slightly in DataGrip 2018.2 EAP (or before), instead of "Copy Settings" it's now "Copy Data Source(s) to Clipboard", which reflects better what it does.
DataGrip stores data sources on two different levels:
Project level: together with project configuration files inside .idea subfolder of the project folder
IDE level: stored in IDE config/options directory.
Project level data source is available once you open the project.
To import/export IDE level Data Source use File | Import/Export settings action.
To move Data Source to IDE settings and back use corresponding action in Datasource Properties dialog (see screenshot) as shown here:
On my current version 2020.1 the projects are on:
/System/Volumes/Data/Users/<USER_NAME>/Library/Application Support/JetBrains/DataGrip2020.1/projects/default/
A good way to find where is it store is just calling:
find . -name "dataSources.xml"
It will find for that file everywhere.
make the data source global and use export settings to export.
https://www.jetbrains.com/help/datagrip/managing-data-sources.html#sharing-data-source-settings
You can find all data sources at this path (change username and version):
C:\Users\fouad.DataGrip2019.1\config\projects\default\.idea
I recently discovered a really cool Mongodb plugin for IntelliJ and DataGrip called 'Mongo Expert' that helps users navigate the Mongodb database and work more efficiently. With support for Commandline MongDB Database Tools like mongoexpert, mongoimport, mongodump, and mongorestore, users can create and execute commands through easy-to-understand dialogues. You can download 'Mongo Expert' from the JetBrains Plugin Repository. I hope it will be useful for you too!
https://plugins.jetbrains.com/plugin/20761-mongo-expert
I am very new to VBA programming , I have a VBA code that reads data from the INI file, the function is like this now my Boss asked me to go with registry ! Can somebody guide me what he meant ? I mean I give the input file,output file in INI file kept in some folder, but what's this registry ? How'd read put input,output file from registry?
I believe he's asking to migrate the INI to a collection of registry strings which can populate your program configuration directly from the registry rather than the INI file. To do this, read this article on creating New Registry Keys -> Here
But before you dive into messing with the registry, verify that is what your boss wants. Because messing with the registry can be a destructive end.
Steve McMahon wrote a great registry class for vb6. You can find it here. http://www.vbaccelerator.com/codelib/inireg/registry.htm
If you intend on using it with MS Access, you'll need to replace all occurrences of App.EXEName with CurrentProject.Name.
You'll want your app to have it's own node under HKEY_CURRENT_USER\Software.
Good luck, and be careful not to mess with any other registry keys.
I didn't see a question on this subject in the archives, so here goes: For those of you experienced Mercurial users, is this a correct .hgignore file to tell VB.Net Express to ignore files/sub-dirs when adding items in a new repository?
bin
obj
temp
*.user
*.suo
*.ncb
Thank you.
well you either need to start each line with glob: or have the first line
syntax:glob
mine (for C#) has Thumbs.db as well.
edit: you can also set up a global ignore list using your global hgrc
How can I add a new topic to TWiki programmatically?
I've got a working TWiki (http://twiki.org/) installation, everything works fine.
I need to find a way to create and add new Topics through the command line, programmatically.
Any ideas how this can be accomplished?
Thanx!
d.
What I did was
take a look at some wiki pages (files in <twiki-home>/data/Main/<PageName>.txt) to figure out the file/text format (pretty much what you see in the browser, preceded by one line of meta info)
generate that text format with a perl script with content based on data from a DB or some Excel
copy the files to the apropriate location using putty's pscp on windows
I think using TWiki scripts is a more "clean" way, as you wouldn't have to worry about metadata in the TXT file or update the .changes file.
Just use wget to make a POST call using the 'save' script (see documentation here)